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