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

            var configuration = BuildConfiguration();

            var builder = new DbContextOptionsBuilder <Demo1MigrationsDbContext>()
                          .UseMySql(configuration.GetConnectionString("Default"));

            return(new Demo1MigrationsDbContext(builder.Options));
        }
示例#2
0
 public override void PreConfigureServices(ServiceConfigurationContext context)
 {
     Demo1EfCoreEntityExtensionMappings.Configure();
 }