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

            var configuration = BuildConfiguration();

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

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