Files
PyroFetes-Sujet1/PyroFetes/Specifications/Products/GetProductsUnderLimitSpec.cs
2025-12-18 14:41:45 +01:00

14 lines
373 B
C#

using Ardalis.Specification;
using PyroFetes.Models;
namespace PyroFetes.Specifications.Products;
public sealed class GetProductsUnderLimitSpec : Specification<Product>
{
public GetProductsUnderLimitSpec()
{
Query
.Include(p => p.QuotationProducts)
.Where(p => p.QuotationProducts.Any(q => q.Quantity < p.MinimalQuantity));
}
}