Collection Rework (#2830)
This commit is contained in:
parent
0dacc061f1
commit
deaaccb96a
93 changed files with 5413 additions and 1120 deletions
|
|
@ -19,6 +19,23 @@ public static class IncludesExtensions
|
|||
queryable = queryable.Include(c => c.SeriesMetadatas);
|
||||
}
|
||||
|
||||
if (includes.HasFlag(CollectionTagIncludes.SeriesMetadataWithSeries))
|
||||
{
|
||||
queryable = queryable.Include(c => c.SeriesMetadatas).ThenInclude(s => s.Series);
|
||||
}
|
||||
|
||||
return queryable.AsSplitQuery();
|
||||
}
|
||||
|
||||
public static IQueryable<AppUserCollection> Includes(this IQueryable<AppUserCollection> queryable,
|
||||
CollectionIncludes includes)
|
||||
{
|
||||
if (includes.HasFlag(CollectionIncludes.Series))
|
||||
{
|
||||
queryable = queryable.Include(c => c.Items);
|
||||
}
|
||||
|
||||
|
||||
return queryable.AsSplitQuery();
|
||||
}
|
||||
|
||||
|
|
@ -206,6 +223,12 @@ public static class IncludesExtensions
|
|||
query = query.Include(u => u.ExternalSources);
|
||||
}
|
||||
|
||||
if (includeFlags.HasFlag(AppUserIncludes.Collections))
|
||||
{
|
||||
query = query.Include(u => u.Collections)
|
||||
.ThenInclude(c => c.Items);
|
||||
}
|
||||
|
||||
return query.AsSplitQuery();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue