Context Load Navigations and Collections

This commit is contained in:
2025-07-21 12:24:54 +02:00
parent 93d3878b07
commit f2bc48bc52
10 changed files with 91 additions and 14 deletions

View File

@@ -1,4 +1,5 @@
using API.Schema.MangaContext;
using Microsoft.EntityFrameworkCore;
namespace API.Workers;
@@ -10,7 +11,9 @@ public class CheckForNewChaptersWorker(TimeSpan? interval = null, IEnumerable<Ba
protected override BaseWorker[] DoWorkInternal()
{
IQueryable<MangaConnectorId<Manga>> connectorIdsManga = DbContext.MangaConnectorToManga.Where(id => id.UseForDownload);
IQueryable<MangaConnectorId<Manga>> connectorIdsManga = DbContext.MangaConnectorToManga
.Include(id => id.Obj)
.Where(id => id.UseForDownload);
List<BaseWorker> newWorkers = new();
foreach (MangaConnectorId<Manga> mangaConnectorId in connectorIdsManga)