From ab6fb3ab88682021df2809d67e4db7c0d0aff3a8 Mon Sep 17 00:00:00 2001 From: Loretta Date: Tue, 6 Jan 2026 15:15:57 +0100 Subject: [PATCH] Update DB to PROD; reformat GetAllByProductId method Switched connection string to use FruitBank_PROD database. Reformatted GetAllByProductId in OrderDtoDbTable.cs for clarity; no logic changes. --- Nop.Plugin.Misc.AIPlugin/Domains/DataLayer/OrderDtoDbTable.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Nop.Plugin.Misc.AIPlugin/Domains/DataLayer/OrderDtoDbTable.cs b/Nop.Plugin.Misc.AIPlugin/Domains/DataLayer/OrderDtoDbTable.cs index c4583e0..a3eff9e 100644 --- a/Nop.Plugin.Misc.AIPlugin/Domains/DataLayer/OrderDtoDbTable.cs +++ b/Nop.Plugin.Misc.AIPlugin/Domains/DataLayer/OrderDtoDbTable.cs @@ -46,7 +46,8 @@ public class OrderDtoDbTable : MgDtoDbTableBase && o.OrderStatusId != (int)OrderStatus.Cancelled && o.GenericAttributes.Any(ga => ga.Key == nameof(OrderDto.DateOfReceipt) && DateTime.Parse(ga.Value) >= fromDate.Date)); - public IQueryable GetAllByProductId(int productId, bool loadRelations = true) => GetAll(loadRelations).Where(o => o.OrderItemDtos.Any(oi => oi.ProductId == productId)); + public IQueryable GetAllByProductId(int productId, bool loadRelations = true) + => GetAll(loadRelations).Where(o => o.OrderItemDtos.Any(oi => oi.ProductId == productId)); public IQueryable GetAllByProductIds(IEnumerable productIds, bool loadRelations = true) => GetAll(loadRelations).Where(o => o.OrderItemDtos.Any(oi => productIds.Contains(oi.ProductId)));