Write out the code needed to pass the unit tests (no UI)

This commit is contained in:
Amelia 2025-05-04 23:32:46 +02:00
parent 96d130d0b5
commit 5ece8503ff
No known key found for this signature in database
GPG key ID: D6D0ECE365407EAA
12 changed files with 3908 additions and 40 deletions

View file

@ -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;
}
}