/// <summary> /// Initializes a new instance of the <see cref="EntityDbContext"/> class. /// </summary> /// <param name="options">The context options used to initialize this database context.</param> public EntityDbContext(DbContextOptions options) : base(options) { ContextOptions = options; var extension = options.FindExtension <EntityDbContextOptionsExtension>(); if (extension != null) { EntityContextOptions = extension.Builder.Options; } else { EntityContextOptions = new EntityDbContextOptions(); } }
/// <summary> /// Called when the services are being registered in the DbContext. /// </summary> /// <param name="serviceCollection">The service collection that can have additional services registered in.</param> /// <param name="entityDbContextOptions">The <see cref="EntityDbContextOptions"/> for this context.</param> public virtual void ApplyServices(IServiceCollection serviceCollection, EntityDbContextOptions entityDbContextOptions) { }