mirror of
https://github.com/C9Glax/tranga.git
synced 2025-09-10 11:58:19 +02:00
Context Load Navigations and Collections
This commit is contained in:
@@ -13,7 +13,11 @@ public class RetrieveMangaChaptersFromMangaconnectorWorker(MangaConnectorId<Mang
|
||||
return []; //TODO Exception?
|
||||
if (!Tranga.TryGetMangaConnector(mangaConnectorId.MangaConnectorName, out MangaConnector? mangaConnector))
|
||||
return []; //TODO Exception?
|
||||
|
||||
DbContext.Entry(mangaConnectorId).Navigation(nameof(MangaConnectorId<Manga>.Obj)).Load();
|
||||
Manga manga = mangaConnectorId.Obj;
|
||||
DbContext.Entry(manga).Collection(m => m.Chapters).Load();
|
||||
|
||||
// This gets all chapters that are not downloaded
|
||||
(Chapter, MangaConnectorId<Chapter>)[] allChapters =
|
||||
mangaConnector.GetChapters(mangaConnectorId, language).DistinctBy(c => c.Item1.Key).ToArray();
|
||||
|
Reference in New Issue
Block a user