Chapter/Issue level Reviews and Ratings (#3778)
Co-authored-by: Joseph Milazzo <josephmajora@gmail.com>
This commit is contained in:
parent
3b8997e46e
commit
4f7625ea77
60 changed files with 5097 additions and 497 deletions
|
|
@ -1,6 +1,7 @@
|
|||
using System.Linq;
|
||||
using API.Data.Repositories;
|
||||
using API.Entities;
|
||||
using API.Entities.Metadata;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace API.Extensions.QueryExtensions;
|
||||
|
|
@ -72,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();
|
||||
}
|
||||
|
||||
|
|
@ -253,6 +260,11 @@ public static class IncludesExtensions
|
|||
.ThenInclude(c => c.Items);
|
||||
}
|
||||
|
||||
if (includeFlags.HasFlag(AppUserIncludes.ChapterRatings))
|
||||
{
|
||||
query = query.Include(u => u.ChapterRatings);
|
||||
}
|
||||
|
||||
return query.AsSplitQuery();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue