public DirectMigrationsDbContext CreateDbContext(string[] args)
        {
            DirectEfCoreEntityExtensionMappings.Configure();

            var configuration = BuildConfiguration();

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

            return(new DirectMigrationsDbContext(builder.Options));
        }
Example #2
0
 public override void PreConfigureServices(ServiceConfigurationContext context)
 {
     DirectEfCoreEntityExtensionMappings.Configure();
 }