Ingest ExternalReviews from K+
Adds a new entity ExternalChapterMetadata, which would allow us to extend chapters to Recommendations, Ratings, etc in the future
This commit is contained in:
parent
749fb24185
commit
052b3f9fe4
29 changed files with 647 additions and 137 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;
|
||||
|
|
@ -303,4 +304,14 @@ 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();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue