protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { if (MigrationConfiguration.IsBuildForMigrations) { IConfiguration configuration = MigrationConfiguration.Configuration; ServiceExtensions.ConfigureOptions(configuration) .Invoke(optionsBuilder); } }