AspireAzureEFCoreCosmosExtensions
Class static net10.0
Extension methods for configuring EntityFrameworkCore DbContext to Azure Cosmos DB
namespace Microsoft.Extensions.Hosting;
public static class AspireAzureEFCoreCosmosExtensions{ // ...}Methods3
Section titled MethodsAddCosmosDbContext(IHostApplicationBuilder, string, Action<EntityFrameworkCoreCosmosSettings>, Action<DbContextOptionsBuilder>)extension Registers the given
EntityFrameworkCore.DbContext as a service in the services provided by the builder. Derives the name of the database from the connection string. AddCosmosDbContext(IHostApplicationBuilder, string, string, Action<EntityFrameworkCoreCosmosSettings>, Action<DbContextOptionsBuilder>)extension Registers the given
EntityFrameworkCore.DbContext as a service in the services provided by the builder. Enables db context pooling, logging and telemetry. EnrichCosmosDbContext(IHostApplicationBuilder, Action<EntityFrameworkCoreCosmosSettings>)extension Configures logging and telemetry for the
EntityFrameworkCore.DbContext.