public TemplateMigrationsDbContext CreateDbContext(string[] args)
        {
            TemplateEfCoreEntityExtensionMappings.Configure();

            var configuration = BuildConfiguration();

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

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