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.
This commit is contained in:
parent
610c3963f0
commit
ab6fb3ab88
|
|
@ -46,7 +46,8 @@ public class OrderDtoDbTable : MgDtoDbTableBase<OrderDto, Order>
|
|||
&& o.OrderStatusId != (int)OrderStatus.Cancelled
|
||||
&& o.GenericAttributes.Any(ga => ga.Key == nameof(OrderDto.DateOfReceipt) && DateTime.Parse(ga.Value) >= fromDate.Date));
|
||||
|
||||
public IQueryable<OrderDto> GetAllByProductId(int productId, bool loadRelations = true) => GetAll(loadRelations).Where(o => o.OrderItemDtos.Any(oi => oi.ProductId == productId));
|
||||
public IQueryable<OrderDto> GetAllByProductId(int productId, bool loadRelations = true)
|
||||
=> GetAll(loadRelations).Where(o => o.OrderItemDtos.Any(oi => oi.ProductId == productId));
|
||||
|
||||
public IQueryable<OrderDto> GetAllByProductIds(IEnumerable<int> productIds, bool loadRelations = true)
|
||||
=> GetAll(loadRelations).Where(o => o.OrderItemDtos.Any(oi => productIds.Contains(oi.ProductId)));
|
||||
|
|
|
|||
Loading…
Reference in New Issue