19 lines
495 B
C#
19 lines
495 B
C#
using LiteCharms.Models;
|
|
|
|
namespace LiteCharms.Features.Products.Queries;
|
|
|
|
public class GetProductPriceQuery : IRequest<Result<ProductPrice>>
|
|
{
|
|
public Guid ProductId { get; set; }
|
|
|
|
private GetProductPriceQuery(Guid productId) => ProductId = productId;
|
|
|
|
public static GetProductPriceQuery Create(Guid productId)
|
|
{
|
|
if (productId == Guid.Empty)
|
|
throw new ArgumentException("ProductId is required.", nameof(productId));
|
|
|
|
return new(productId);
|
|
}
|
|
}
|