Implemented shopping carts functionality elements
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user