Class IServiceCollectionExtensions
Extension methods for IServiceCollection to configure Entity Framework Core.
public static class IServiceCollectionExtensions
- Inheritance
-
IServiceCollectionExtensions
Methods
- AddDbContextAndFactory<TContext, TFactoryInterface, TFactory>(IServiceCollection, ISqlConnectionOption)
Adds the specified
TContext
andTFactory
to the IServiceCollection as scoped services.
- AddDbContextAndFactory<TContext, TFactoryInterface, TFactory>(IServiceCollection, Action<DbContextOptionsBuilder>)
Adds the specified
TContext
andTFactory
to the IServiceCollection as scoped services.
- AddDbContextAndFactory<TContext, TFactoryInterface, TFactory>(IServiceCollection, string)
Adds the specified
TContext
andTFactory
to the IServiceCollection as scoped services.
- AddDbContextAndFactory<TContext, TFactoryInterface, TFactory>(IServiceCollection, string, string, string)
Adds the specified
TContext
andTFactory
to the IServiceCollection as scoped services.
- AddDbContextOnly<TContext>(IServiceCollection, Action<DbContextOptionsBuilder>)
Adds the specified
TContext
to the IServiceCollection as a scoped service.
- TryAddBaseDataLayer(IServiceCollection)
Tries to add the base data layer services to the IServiceCollection.