From 608f51ae3356ca727cb15d1fbb66abbd080a1a3b Mon Sep 17 00:00:00 2001 From: malik masis Date: Tue, 15 Mar 2022 10:45:36 +0300 Subject: [PATCH] Included detail into GetListPagedAsync --- .../Orders/OrderAppService.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/services/ordering/src/EShopOnAbp.OrderingService.Application/Orders/OrderAppService.cs b/services/ordering/src/EShopOnAbp.OrderingService.Application/Orders/OrderAppService.cs index 6ba22894..1e9191de 100644 --- a/services/ordering/src/EShopOnAbp.OrderingService.Application/Orders/OrderAppService.cs +++ b/services/ordering/src/EShopOnAbp.OrderingService.Application/Orders/OrderAppService.cs @@ -54,7 +54,7 @@ public class OrderAppService : ApplicationService, IOrderAppService [Authorize(OrderingServicePermissions.Orders.Default)] public async Task> GetListPagedAsync(PagedAndSortedResultRequestDto input) { - var queryable = await _orderRepository.GetQueryableAsync(); + var queryable = await _orderRepository.WithDetailsAsync(); var orders = await AsyncExecuter.ToListAsync( queryable @@ -64,7 +64,6 @@ public class OrderAppService : ApplicationService, IOrderAppService ); var totalCount = await _orderRepository.GetCountAsync(); - //TODO Refactor Order Status return new PagedResultDto( totalCount, CreateOrderDtoMapping(orders) @@ -151,8 +150,8 @@ public class OrderAppService : ApplicationService, IOrderAppService Id = order.Id, OrderNo = order.OrderNo, OrderDate = order.OrderDate, - OrderStatus = order.OrderStatus?.Name, - OrderStatusId = order.OrderStatus?.Id ?? 0, + OrderStatus = order.OrderStatus.Name, + OrderStatusId = order.OrderStatus.Id, PaymentMethod = order.PaymentMethod }; }