Skip to content
DocsTry Aspire
DocsTry

CosmosDatabaseBuilder Methods

ClassMethods1 member
Represents a builder that can be used to register multiple container instances against the same Cosmos database connection.
Register a Cosmos.Container against the database managed with CosmosDatabaseBuilder as a keyed singleton.
public sealed class CosmosDatabaseBuilder
{
public CosmosDatabaseBuilder AddKeyedContainer(
string name)
{
// ...
}
}
namestringThe name of the container to register.
CosmosDatabaseBuilderA CosmosDatabaseBuilder that can be used for further chaining.