forked from sanchezvem/PyroFetes
Refactored QuotationProduct
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
using Ardalis.Specification;
|
||||
using PyroFetes.Models;
|
||||
|
||||
namespace PyroFetes.Specifications.QuotationProducts;
|
||||
|
||||
public sealed class GetQuotationProductByProductIdAndQuotationIdSpec : Specification<QuotationProduct>
|
||||
{
|
||||
public GetQuotationProductByProductIdAndQuotationIdSpec(int productId, int quotationId)
|
||||
{
|
||||
Query
|
||||
.Where(x => x.ProductId == productId && x.QuotationId == quotationId);
|
||||
}
|
||||
}
|
||||
13
PyroFetes/Specifications/Quotations/GetQuotationByIdSpec.cs
Normal file
13
PyroFetes/Specifications/Quotations/GetQuotationByIdSpec.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Ardalis.Specification;
|
||||
using PyroFetes.Models;
|
||||
|
||||
namespace PyroFetes.Specifications.Quotations;
|
||||
|
||||
public sealed class GetQuotationByIdSpec : Specification<Quotation>
|
||||
{
|
||||
public GetQuotationByIdSpec(int quotationId)
|
||||
{
|
||||
Query
|
||||
.Where(x => x.Id == quotationId);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user