forked from sanchezvem/pyrofetes-backend
Refactor all code
This commit is contained in:
@@ -3,13 +3,13 @@ using PyroFetes.Models;
|
||||
|
||||
namespace PyroFetes.Specifications.DeliveryNotes;
|
||||
|
||||
public class GetDeliveryNoteByIdWithProductsSpec : Specification<DeliveryNote>
|
||||
public class GetDeliveryNoteByIdWithProductsSpec : SingleResultSpecification<DeliveryNote>
|
||||
{
|
||||
public GetDeliveryNoteByIdWithProductsSpec(int deliveryNoteId)
|
||||
{
|
||||
Query
|
||||
.Where(d => d.Id == deliveryNoteId)
|
||||
.Include(d => d.ProductDeliveries!)
|
||||
.ThenInclude(dp => dp.Product);
|
||||
.Where(x => x.Id == deliveryNoteId)
|
||||
.Include(x => x.ProductDeliveries!)
|
||||
.ThenInclude(p => p.Product);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user