Some unit tests, names and small fixes

This commit is contained in:
Amelia 2025-05-15 23:58:42 +02:00
parent 23c4a451b4
commit 06914d1135
No known key found for this signature in database
GPG key ID: D6D0ECE365407EAA
10 changed files with 332 additions and 13 deletions

View file

@ -342,4 +342,20 @@ public static class IncludesExtensions
return queryable;
}
public static IQueryable<AppUserReadingProfile> Includes(this IQueryable<AppUserReadingProfile> queryable, ReadingProfileIncludes includeFlags)
{
if (includeFlags.HasFlag(ReadingProfileIncludes.Series))
{
queryable = queryable.Include(r => r.Series);
}
if (includeFlags.HasFlag(ReadingProfileIncludes.Library))
{
queryable = queryable.Include(r => r.Libraries);
}
return queryable;
}
}