mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
refactor(dir): ♻🚧 comment npgsql reload types throwing disposed exception
This commit is contained in:
parent
2fe9788b3c
commit
bb6be61cc4
1 changed files with 5 additions and 3 deletions
|
|
@ -16,9 +16,11 @@ public static async Task MigrateAsync(this IHost host)
|
|||
using var scope = host.Services.CreateScope();
|
||||
var db = scope.ServiceProvider.GetRequiredService<QueryDbContext>();
|
||||
await db.Database.MigrateAsync();
|
||||
await using var conn = (NpgsqlConnection)db.Database.GetDbConnection();
|
||||
await conn.OpenAsync();
|
||||
conn.ReloadTypes();
|
||||
|
||||
// TODO: sometimes throws System.ObjectDisposedException, but sometimes needed for https://www.npgsql.org/efcore/mapping/enum.html#creating-your-database-enum
|
||||
//await using var conn = (NpgsqlConnection)db.Database.GetDbConnection();
|
||||
//await conn.OpenAsync();
|
||||
//conn.ReloadTypes();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue