mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-24 01:34:45 +03:00
Fixed DbContext usage on Provider
This commit is contained in:
@@ -575,7 +575,11 @@ namespace Emby.Server.Implementations
|
||||
/// <returns>A task representing the service initialization operation.</returns>
|
||||
public async Task InitializeServices()
|
||||
{
|
||||
var jellyfinDb = await Resolve<IDbContextFactory<JellyfinDbContext>>().CreateDbContextAsync().ConfigureAwait(false);
|
||||
var factory = Resolve<IDbContextFactory<JellyfinDbContext>>();
|
||||
var provider = Resolve<IJellyfinDatabaseProvider>();
|
||||
provider.DbContextFactory = factory;
|
||||
|
||||
var jellyfinDb = await factory.CreateDbContextAsync().ConfigureAwait(false);
|
||||
await using (jellyfinDb.ConfigureAwait(false))
|
||||
{
|
||||
if ((await jellyfinDb.Database.GetPendingMigrationsAsync().ConfigureAwait(false)).Any())
|
||||
|
||||
Reference in New Issue
Block a user