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

            var configuration = BuildConfiguration();

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

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