Files
components/LiteCharms.Features/Products/Queries/GetProductQuery.cs
T
2026-05-03 16:10:27 +02:00

19 lines
475 B
C#

using LiteCharms.Models;
namespace LiteCharms.Features.Products.Queries;
public class GetProductQuery : IRequest<Result<Product>>
{
public Guid ProductId { get; set; }
private GetProductQuery(Guid productId) => ProductId = productId;
public static GetProductQuery Create(Guid productId)
{
if(productId == Guid.Empty)
throw new ArgumentException("Product ID is required.", nameof(productId));
return new(productId);
}
}