Files
TP-Fluent/BookHive/Specifications/Members/GetMemberByIdSpec.cs
2026-03-10 11:28:12 +01:00

18 lines
470 B
C#

using Ardalis.Specification;
using BookHive.Models;
namespace BookHive.Specifications.Members;
public class GetMemberByIdSpec : SingleResultSpecification<Member>
{
public GetMemberByIdSpec(int memberId)
{
Query
.Include(x => x.Loans)!
.ThenInclude(x => x.Book)
.ThenInclude(a => a!.Author)
.Include(x => x.Reviews)!
.ThenInclude(x => x.Book)
.Where(x => x.Id == memberId);
}
}