Added support for notifications
This commit is contained in:
@@ -4,5 +4,15 @@ namespace LiteCharms.Features.Products.Queries;
|
||||
|
||||
public class GetProductsQuery : IRequest<Result<Product[]>>
|
||||
{
|
||||
public static GetProductsQuery Create() => new();
|
||||
public int MaxRecords { get; set; }
|
||||
|
||||
private GetProductsQuery(int maxRecords = 1000) => MaxRecords = maxRecords;
|
||||
|
||||
public static GetProductsQuery Create(int maxRecords = 1000)
|
||||
{
|
||||
if (maxRecords <= 0)
|
||||
throw new ArgumentException("MaxRecords must be a positive integer.");
|
||||
|
||||
return new(maxRecords);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user