using Ardalis.Specification; using BookHive.Models; namespace BookHive.Specifications.Members; public class GetMemberByIdSpec : SingleResultSpecification { 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); } }