Files
components/LiteCharms.Features/ShoppingCarts/Commands/EmptyShoppingCartCommand.cs
T
2026-05-06 10:48:02 +02:00

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);
}
}