Files
components/LiteCharms.Features/Products/Queries/GetProductPricesQuery.cs
T
2026-05-05 14:36:46 +02:00

19 lines
535 B
C#

using LiteCharms.Models;
namespace LiteCharms.Features.Products.Queries;
public class GetProductPricesQuery : IRequest<Result<ProductPrice[]>>
{
public int MaxRecords { get; set; }
private GetProductPricesQuery(int maxRecords = 1000) => MaxRecords = maxRecords;
public static GetProductPricesQuery Create(int maxRecords = 1000)
{
if (maxRecords <= 0)
throw new ArgumentOutOfRangeException(nameof(maxRecords), "MaxRecords must be greater than zero.");
return new(maxRecords);
}
}