forked from sanchezvem/pyrofetes-backend
Refactor all code
This commit is contained in:
@@ -3,11 +3,13 @@ using PyroFetes.Models;
|
||||
|
||||
namespace PyroFetes.Specifications.Suppliers;
|
||||
|
||||
public sealed class GetSupplierByIdSpec : Specification<Supplier>
|
||||
public sealed class GetSupplierByIdSpec : SingleResultSpecification<Supplier>
|
||||
{
|
||||
public GetSupplierByIdSpec(int? supplierId)
|
||||
{
|
||||
Query
|
||||
.Include(x => x.Prices!)
|
||||
.ThenInclude(p => p.Product)
|
||||
.Where(x => x.Id == supplierId);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user