forked from sanchezvem/PyroFetes
14 lines
373 B
C#
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));
|
|
}
|
|
} |