Nucleus .Net Core CMS

DbContextConfigurator<TDataProvider> Class

Namespace: Nucleus.Data.EntityFramework
Assembly: Nucleus.Data.EntityFramework.dll
Database providers which use Entity Framework implement this interface in order to configure their Entity Framework DbContext using Nucleus configuration data.
Type Parameters
TDataProvider

Remarks

Register your implementation of this class in the dependency injection service container, Nucleus will use it automatically.

Example

services.AddSingleton<Nucleus.Data.EntityFramework.IDbContextConfigurator<LinksDataProvider>, Nucleus.Data.Sqlite.SqliteOptionsConfigurator<LinksDataProvider>>();

Constructor

Nucleus.Data.EntityFramework.DbContextConfigurator<TDataProvider> Constructor

Nucleus.Data.EntityFramework.DbContextConfigurator<TDataProvider> (IOptions<DatabaseOptions> databaseOptions)
Create a new instance of this class
Parameters
Name Type
databaseOptions Microsoft.Extensions.Options.IOptions<Nucleus.Abstractions.Models.Configuration.DatabaseOptions>