Exemplo n.º 1
0
        public InfraMigrationsDbContext CreateDbContext(string[] args)
        {
            InfraEfCoreEntityExtensionMappings.Configure();

            var configuration = BuildConfiguration();

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

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