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