Add validators and services for Product Galleries and Product Tags

- Implemented Create, Delete, Get, and Update validators for Product Galleries.
- Added Create, Delete, Get, and Update validators for Product Tags.
- Created service classes for handling Discount Categories, Discount Orders, Discount Products, Discount Shopping Cart, Product Categories, Product Galleries, and Product Tags.
- Each service class integrates with CQRS for command and query handling.
- Established mapping profiles for Product Galleries.
This commit is contained in:
masoodafar-web
2025-12-04 02:40:49 +03:30
parent 40d54d08fc
commit f0f48118e7
436 changed files with 33159 additions and 2005 deletions

View File

@@ -11,12 +11,12 @@ public class GetUserCartsQueryHandler : IRequestHandler<GetUserCartsQuery, GetUs
public async Task<GetUserCartsResponseDto> Handle(GetUserCartsQuery request,
CancellationToken cancellationToken)
{
var response = await _context.UserCartss
var response = await _context.UserCarts
.AsNoTracking()
.Where(x => x.Id == request.Id)
.ProjectToType<GetUserCartsResponseDto>()
.FirstOrDefaultAsync(cancellationToken);
return response ?? throw new NotFoundException(nameof(UserCarts), request.Id);
return response ?? throw new NotFoundException(nameof(UserCart), request.Id);
}
}