public PostgeSqlDemoMigrationsDbContext CreateDbContext(string[] args)
        {
            PostgeSqlDemoEfCoreEntityExtensionMappings.Configure();

            var configuration = BuildConfiguration();

            var builder = new DbContextOptionsBuilder <PostgeSqlDemoMigrationsDbContext>()
                          .UseNpgsql(configuration.GetConnectionString("Default"), opts => opts.UseNetTopologySuite());

            return(new PostgeSqlDemoMigrationsDbContext(builder.Options));
        }
Exemple #2
0
 public override void PreConfigureServices(ServiceConfigurationContext context)
 {
     PostgeSqlDemoEfCoreEntityExtensionMappings.Configure();
 }