Exemplo n.º 1
0
        public PoetryMigrationsDbContext CreateDbContext(string[] args)
        {
            PoetryEfCoreEntityExtensionMappings.Configure();

            var configuration = BuildConfiguration();

            var builder = new DbContextOptionsBuilder <PoetryMigrationsDbContext>()
                          .UseNpgsql(configuration.GetConnectionString("Default"));

            return(new PoetryMigrationsDbContext(builder.Options));
        }
Exemplo n.º 2
0
 public override void PreConfigureServices(ServiceConfigurationContext context)
 {
     PoetryEfCoreEntityExtensionMappings.Configure();
 }