Made repository methods asynchronous. Simplified playlist repository. Use playlist manager in the app, and left playlist repository to only be used by the playlist manager.
This commit is contained in:
@@ -24,4 +24,16 @@ public static class ServiceCollectionExtensions
|
||||
|
||||
return services;
|
||||
}
|
||||
}
|
||||
|
||||
public static class ServiceProviderExtensions
|
||||
{
|
||||
public static async Task InitializeHarmoniaAsync(this IServiceProvider serviceProvider)
|
||||
{
|
||||
IPlaylistRepository playlistRepository = serviceProvider.GetRequiredService<IPlaylistRepository>();
|
||||
await playlistRepository.InitializeAsync();
|
||||
|
||||
IPlaylistManager playlistManager = serviceProvider.GetRequiredService<IPlaylistManager>();
|
||||
await playlistManager.InitializeAsync();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user