Added notifications
Added shopping cart and items Added quotes Refactored relatinoships Migrated changes Refactored cqrs commands and queries Refactored mappings
This commit is contained in:
@@ -12,6 +12,9 @@ public class GetProductPriceQueryHandler(IDbContextFactory<LeadGeneratorDbContex
|
||||
{
|
||||
using var context = await contextFactory.CreateDbContextAsync(cancellationToken);
|
||||
|
||||
if(!await context.Products.AnyAsync(p => p.Id == request.ProductId, cancellationToken))
|
||||
return Result.Fail<ProductPrice>(new Error($"Product {request.ProductId} not found."));
|
||||
|
||||
var productPrice = await context.ProductPrices.AsNoTracking()
|
||||
.Where(pp => pp.ProductId == request.ProductId && pp.Active)
|
||||
.OrderByDescending(pp => pp.CreatedAt)
|
||||
|
||||
Reference in New Issue
Block a user