diff --git a/LittleShop/Services/ProductService.cs b/LittleShop/Services/ProductService.cs index 864eb38..f03d515 100644 --- a/LittleShop/Services/ProductService.cs +++ b/LittleShop/Services/ProductService.cs @@ -24,6 +24,7 @@ public class ProductService : IProductService .Include(p => p.MultiBuys) .Include(p => p.Variants) .Where(p => p.IsActive) + .AsSplitQuery() .ToListAsync(); return products.Select(p => new ProductDto @@ -86,6 +87,7 @@ public class ProductService : IProductService .Include(p => p.MultiBuys) .Include(p => p.Variants) .Where(p => p.IsActive && p.CategoryId == categoryId) + .AsSplitQuery() .ToListAsync(); return products.Select(p => new ProductDto