first commit
This commit is contained in:
13
BookHive/Specifications/Authors/GetAuthorByIdSpec.cs
Normal file
13
BookHive/Specifications/Authors/GetAuthorByIdSpec.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Ardalis.Specification;
|
||||
using BookHive.Models;
|
||||
|
||||
namespace BookHive.Specifications.Authors;
|
||||
|
||||
public class GetAuthorByIdSpec : SingleResultSpecification<Author>
|
||||
{
|
||||
public GetAuthorByIdSpec(int authorId)
|
||||
{
|
||||
Query
|
||||
.Where(x => x.Id == authorId);
|
||||
}
|
||||
}
|
||||
13
BookHive/Specifications/Books/GetBookByIdSpec.cs
Normal file
13
BookHive/Specifications/Books/GetBookByIdSpec.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Ardalis.Specification;
|
||||
using BookHive.Models;
|
||||
|
||||
namespace BookHive.Specifications.Books;
|
||||
|
||||
public class GetBookByIdSpec : SingleResultSpecification<Book>
|
||||
{
|
||||
public GetBookByIdSpec(int bookId)
|
||||
{
|
||||
Query
|
||||
.Where(x => x.Id == bookId);
|
||||
}
|
||||
}
|
||||
13
BookHive/Specifications/Loans/GetLoanByIdSpec.cs
Normal file
13
BookHive/Specifications/Loans/GetLoanByIdSpec.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Ardalis.Specification;
|
||||
using BookHive.Models;
|
||||
|
||||
namespace BookHive.Specifications.Loans;
|
||||
|
||||
public class GetLoanByIdSpec : SingleResultSpecification<Loan>
|
||||
{
|
||||
public GetLoanByIdSpec(int loanId)
|
||||
{
|
||||
Query
|
||||
.Where(x => x.Id == loanId);
|
||||
}
|
||||
}
|
||||
13
BookHive/Specifications/Members/GetMemberByIdSpec.cs
Normal file
13
BookHive/Specifications/Members/GetMemberByIdSpec.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Ardalis.Specification;
|
||||
using BookHive.Models;
|
||||
|
||||
namespace BookHive.Specifications.Members;
|
||||
|
||||
public class GetMemberByIdSpec : SingleResultSpecification<Member>
|
||||
{
|
||||
public GetMemberByIdSpec(int memberId)
|
||||
{
|
||||
Query
|
||||
.Where(x => x.Id == memberId);
|
||||
}
|
||||
}
|
||||
13
BookHive/Specifications/Reviews/GetReviewByBookIdSpec.cs
Normal file
13
BookHive/Specifications/Reviews/GetReviewByBookIdSpec.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Ardalis.Specification;
|
||||
using BookHive.Models;
|
||||
|
||||
namespace BookHive.Specifications.Reviews;
|
||||
|
||||
public class GetReviewByBookIdSpec : Specification<Review>
|
||||
{
|
||||
public GetReviewByBookIdSpec(int bookId)
|
||||
{
|
||||
Query
|
||||
.Where(x => x.Id == bookId);
|
||||
}
|
||||
}
|
||||
13
BookHive/Specifications/Reviews/GetReviewByIdSpec.cs
Normal file
13
BookHive/Specifications/Reviews/GetReviewByIdSpec.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Ardalis.Specification;
|
||||
using BookHive.Models;
|
||||
|
||||
namespace BookHive.Specifications.Reviews;
|
||||
|
||||
public class GetReviewByIdSpec : SingleResultSpecification<Review>
|
||||
{
|
||||
public GetReviewByIdSpec(int reviewId)
|
||||
{
|
||||
Query
|
||||
.Where(x => x.Id == reviewId);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user