Added shared projects
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user