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

        var configuration = BuildConfiguration();

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

        return(new HellsGateDbContext(builder.Options));
    }
示例#2
0
 public override void PreConfigureServices(ServiceConfigurationContext context)
 {
     HellsGateEfCoreEntityExtensionMappings.Configure();
 }