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:
Khwezi Mngoma
2026-05-05 23:59:31 +02:00
parent 4b822c63b2
commit 83f51c6a23
67 changed files with 3051 additions and 42 deletions
@@ -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)