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

16 lines
381 B
C#

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