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

            var configuration = BuildConfiguration();

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

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