示例#1
0
        public PSIpgCSapiMigrationsDbContext CreateDbContext(string[] args)
        {
            PSIpgCSapiEfCoreEntityExtensionMappings.Configure();

            var configuration = BuildConfiguration();

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

            return(new PSIpgCSapiMigrationsDbContext(builder.Options));
        }
 public override void PreConfigureServices(ServiceConfigurationContext context)
 {
     PSIpgCSapiEfCoreEntityExtensionMappings.Configure();
 }