Bump .NET 8.0 (#5479)

This commit is contained in:
Nicolas Dorier
2023-11-21 14:11:17 +09:00
committed by GitHub
parent 3ee4f43eb5
commit 9ccc42f556
24 changed files with 46 additions and 48 deletions

View File

@@ -173,7 +173,11 @@ namespace BTCPayServer.Hosting
return;
{
var postgres = new NpgsqlConnectionStringBuilder(p);
using var postgresContext = new ApplicationDbContext(new DbContextOptionsBuilder<ApplicationDbContext>().UseNpgsql(p, o => o.CommandTimeout(60 * 60 * 10)).Options);
using var postgresContext = new ApplicationDbContext(new DbContextOptionsBuilder<ApplicationDbContext>().UseNpgsql(p, o =>
{
o.CommandTimeout(60 * 60 * 10);
o.SetPostgresVersion(12, 0);
}).Options);
string? state;
try
{
@@ -212,7 +216,7 @@ namespace BTCPayServer.Hosting
foreach (var t in postgresContext.Model.GetRelationalModel().Tables.OrderByTopology())
{
var typeMapping = t.EntityTypeMappings.Single();
var query = (IQueryable<object>)otherContext.GetType().GetMethod("Set", new Type[0])!.MakeGenericMethod(typeMapping.EntityType.ClrType).Invoke(otherContext, null)!;
var query = (IQueryable<object>)otherContext.GetType().GetMethod("Set", new Type[0])!.MakeGenericMethod(typeMapping.TypeBase.ClrType).Invoke(otherContext, null)!;
if (t.Name == "WebhookDeliveries" ||
t.Name == "InvoiceWebhookDeliveries" ||
t.Name == "StoreRoles")