Simply entities & seperate endpoints

This commit is contained in:
Amelia 2025-04-28 20:31:47 +02:00
parent 41faa30e6f
commit 6d4dfcda67
No known key found for this signature in database
GPG key ID: D6D0ECE365407EAA
22 changed files with 299 additions and 615 deletions

View file

@ -73,6 +73,12 @@ public static class IncludesExtensions
.Include(c => c.Tags);
}
if (includes.HasFlag(ChapterIncludes.ExternalReviews))
{
queryable = queryable
.Include(c => c.ExternalReviews);
}
return queryable.AsSplitQuery();
}
@ -309,14 +315,4 @@ public static class IncludesExtensions
return query.AsSplitQuery();
}
public static IQueryable<ExternalChapterMetadata> Includes(this IQueryable<ExternalChapterMetadata> query, ExternalChapterMetadataIncludes includeFlags)
{
if (includeFlags.HasFlag(ExternalChapterMetadataIncludes.ExternalReviews))
{
query = query.Include(e => e.ExternalReviews);
}
return query.AsSplitQuery();
}
}