Write out the code needed to pass the unit tests (no UI)
This commit is contained in:
parent
96d130d0b5
commit
5ece8503ff
12 changed files with 3908 additions and 40 deletions
|
|
@ -2,6 +2,7 @@
|
|||
using API.Data.Repositories;
|
||||
using API.Entities;
|
||||
using API.Entities.Metadata;
|
||||
using API.Entities.Person;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace API.Extensions.QueryExtensions;
|
||||
|
|
@ -321,4 +322,15 @@ public static class IncludesExtensions
|
|||
|
||||
return query.AsSplitQuery();
|
||||
}
|
||||
|
||||
public static IQueryable<Person> Includes(this IQueryable<Person> queryable, PersonIncludes includeFlags)
|
||||
{
|
||||
|
||||
if (includeFlags.HasFlag(PersonIncludes.Aliases))
|
||||
{
|
||||
queryable = queryable.Include(p => p.Aliases);
|
||||
}
|
||||
|
||||
return queryable;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue