Skip to content
Docs Try Aspire

CosmosDatabaseBuilder Methods

Class Methods 1 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)
{
// ...
}
}
name string The name of the container to register.
CosmosDatabaseBuilder A CosmosDatabaseBuilder that can be used for further chaining.