Beispiel #1
0
        public FreeMarketMigrationsDbContext CreateDbContext(string[] args)
        {
            FreeMarketEfCoreEntityExtensionMappings.Configure();

            var configuration = BuildConfiguration();

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

            return(new FreeMarketMigrationsDbContext(builder.Options));
        }
Beispiel #2
0
 public override void PreConfigureServices(ServiceConfigurationContext context)
 {
     FreeMarketEfCoreEntityExtensionMappings.Configure();
 }