17 lines
520 B
C#
17 lines
520 B
C#
namespace LiteCharms.Features.ShoppingCarts.Commands;
|
|
|
|
public class EmptyShoppingCartCommand : IRequest<Result>
|
|
{
|
|
public Guid ShoppingCartId { get; set; }
|
|
|
|
private EmptyShoppingCartCommand(Guid shoppingCartId) => ShoppingCartId = shoppingCartId;
|
|
|
|
public static EmptyShoppingCartCommand Create(Guid shoppingCartId)
|
|
{
|
|
if(shoppingCartId == Guid.Empty)
|
|
throw new ArgumentException($"Shopping cart ID is required.", nameof(shoppingCartId));
|
|
|
|
return new(shoppingCartId);
|
|
}
|
|
}
|