Ejemplo n.º 1
0
        public EShopSampleMigrationsDbContext CreateDbContext(string[] args)
        {
            EShopSampleEfCoreEntityExtensionMappings.Configure();

            var configuration = BuildConfiguration();

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

            return(new EShopSampleMigrationsDbContext(builder.Options));
        }
Ejemplo n.º 2
0
 public override void PreConfigureServices(ServiceConfigurationContext context)
 {
     EShopSampleEfCoreEntityExtensionMappings.Configure();
 }