public DataCenterMigrationsDbContext CreateDbContext(string[] args)
        {
            DataCenterEfCoreEntityExtensionMappings.Configure();

            var configuration = BuildConfiguration();

            var builder = new DbContextOptionsBuilder <DataCenterMigrationsDbContext>()
                          .UseSqlServer(configuration.GetConnectionString("Default"));

            return(new DataCenterMigrationsDbContext(builder.Options));
        }
Exemplo n.º 2
0
 public override void PreConfigureServices(ServiceConfigurationContext context)
 {
     DataCenterEfCoreEntityExtensionMappings.Configure();
 }