コード例 #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));
        }
コード例 #2
0
 public override void PreConfigureServices(ServiceConfigurationContext context)
 {
     PSIpgCSapiEfCoreEntityExtensionMappings.Configure();
 }