83f51c6a23
Added shopping cart and items Added quotes Refactored relatinoships Migrated changes Refactored cqrs commands and queries Refactored mappings
19 lines
498 B
C#
19 lines
498 B
C#
using LiteCharms.Models;
|
|
|
|
namespace LiteCharms.Features.Orders.Queries;
|
|
|
|
public class GetCustomerOrdersQuery : IRequest<Result<Order[]>>
|
|
{
|
|
public Guid CustomerId { get; }
|
|
|
|
private GetCustomerOrdersQuery(Guid customerId) => CustomerId = customerId;
|
|
|
|
public static GetCustomerOrdersQuery Create(Guid customerId)
|
|
{
|
|
if (customerId == Guid.Empty)
|
|
throw new ArgumentException("CustomerId is required.", nameof(customerId));
|
|
|
|
return new(customerId);
|
|
}
|
|
}
|