14 lines
314 B
C#
14 lines
314 B
C#
using Ardalis.Specification;
|
|
using BookHive.Models;
|
|
|
|
namespace BookHive.Specifications.Authors;
|
|
|
|
public class GetAuthorByIdSpec : SingleResultSpecification<Author>
|
|
{
|
|
public GetAuthorByIdSpec(int authorId)
|
|
{
|
|
Query
|
|
.Include(x => x.Books)
|
|
.Where(x => x.Id == authorId);
|
|
}
|
|
} |