Fix: Remove filtered Include for variants in GetProductsByCategoryAsync
Previous commit (e931f77) only fixed GetAllProductsAsync and GetProductByIdAsync.
This commit fixes GetProductsByCategoryAsync which also had the broken filtered Include syntax.
**Impact**: Variants will now appear when browsing products by category in TeleBot.
🤖 Generated with Claude Code
https://claude.com/claude-code
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -82,8 +82,8 @@ public class ProductService : IProductService
|
||||
return await _context.Products
|
||||
.Include(p => p.Category)
|
||||
.Include(p => p.Photos)
|
||||
.Include(p => p.MultiBuys.Where(v => v.IsActive))
|
||||
.Include(p => p.Variants.Where(v => v.IsActive))
|
||||
.Include(p => p.MultiBuys)
|
||||
.Include(p => p.Variants)
|
||||
.Where(p => p.IsActive && p.CategoryId == categoryId)
|
||||
.Select(p => new ProductDto
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user