Files
components/LiteCharms.Features/Shop/Customers/Queries/GetCustomerQuery.cs
T
2026-05-13 20:06:24 +02:00

19 lines
513 B
C#

using LiteCharms.Features.Shop.Customers.Models;
namespace LiteCharms.Features.Customers.Queries;
public class GetCustomerQuery : IRequest<Result<Customer>>
{
public Guid CustomerId { get; set; }
private GetCustomerQuery(Guid customerId) => CustomerId = customerId;
public static GetCustomerQuery Create(Guid customerId)
{
if(customerId == Guid.Empty)
throw new ArgumentException("Customer ID is required.", nameof(customerId));
return new(customerId);
}
}