mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-15 09:43:35 -05:00
fix memory leak issue related to AddDbContext not working as expected
This commit is contained in:
@ -13,7 +13,7 @@ namespace SharedLibraryCore.Database
|
||||
{
|
||||
public static async Task Seed(IDatabaseContextFactory contextFactory, CancellationToken token)
|
||||
{
|
||||
var context = contextFactory.CreateContext();
|
||||
await using var context = contextFactory.CreateContext();
|
||||
var strategy = context.Database.CreateExecutionStrategy();
|
||||
await strategy.ExecuteAsync(async () =>
|
||||
{
|
||||
|
Reference in New Issue
Block a user