forked from sanchezvem/pyrofetes-backend
15 lines
430 B
C#
15 lines
430 B
C#
using Ardalis.Specification;
|
|
using PyroFetes.Models;
|
|
|
|
namespace PyroFetes.Specifications.DeliveryNotes;
|
|
|
|
public class GetDeliveryNoteByIdWithProductsSpec : SingleResultSpecification<DeliveryNote>
|
|
{
|
|
public GetDeliveryNoteByIdWithProductsSpec(int deliveryNoteId)
|
|
{
|
|
Query
|
|
.Where(x => x.Id == deliveryNoteId)
|
|
.Include(x => x.ProductDeliveries!)
|
|
.ThenInclude(p => p.Product);
|
|
}
|
|
} |