public EasyMallMigrationsDbContext CreateDbContext(string[] args)
        {
            EasyMallEfCoreEntityExtensionMappings.Configure();

            var configuration = BuildConfiguration();

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

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