コード例 #1
0
        public DataCenterMigrationsDbContext CreateDbContext(string[] args)
        {
            DataCenterEfCoreEntityExtensionMappings.Configure();

            var configuration = BuildConfiguration();

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

            return(new DataCenterMigrationsDbContext(builder.Options));
        }
コード例 #2
0
 public override void PreConfigureServices(ServiceConfigurationContext context)
 {
     DataCenterEfCoreEntityExtensionMappings.Configure();
 }