示例#1
0
        public CustomApplicationModulesMigrationsDbContext CreateDbContext(string[] args)
        {
            CustomApplicationModulesEfCoreEntityExtensionMappings.Configure();

            var configuration = BuildConfiguration();

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

            return(new CustomApplicationModulesMigrationsDbContext(builder.Options));
        }
 public override void PreConfigureServices(ServiceConfigurationContext context)
 {
     CustomApplicationModulesEfCoreEntityExtensionMappings.Configure();
 }