mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-10 15:20:48 -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 () =>
|
||||
{
|
||||
|
@ -13,7 +13,7 @@ namespace SharedLibraryCore.Database.MigrationContext
|
||||
}
|
||||
}
|
||||
|
||||
public MySqlDatabaseContext(DbContextOptions<MySqlDatabaseContext> options) : base(options)
|
||||
public MySqlDatabaseContext(DbContextOptions options) : base(options)
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ namespace SharedLibraryCore.Database.MigrationContext
|
||||
}
|
||||
}
|
||||
|
||||
public PostgresqlDatabaseContext(DbContextOptions<PostgresqlDatabaseContext> options) : base(options)
|
||||
public PostgresqlDatabaseContext(DbContextOptions options) : base(options)
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ namespace SharedLibraryCore.Database.MigrationContext
|
||||
}
|
||||
}
|
||||
|
||||
public SqliteDatabaseContext(DbContextOptions<SqliteDatabaseContext> options) : base(options)
|
||||
public SqliteDatabaseContext(DbContextOptions options) : base(options)
|
||||
{
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user