|
|
|
@ -185,15 +185,14 @@ public class OrderAppService : ApplicationService, IOrderAppService |
|
|
|
.GetProductsByIdsAsync(productIds)) |
|
|
|
.ToDictionary(p => p.Id, p => p.Name); |
|
|
|
|
|
|
|
var result = ObjectMapper.Map<List<Order>, List<OrderDto>>(orders); |
|
|
|
result = result.Select(a => |
|
|
|
var orderDtos = ObjectMapper.Map<List<Order>, List<OrderDto>>(orders); |
|
|
|
|
|
|
|
orderDtos.ForEach(orderDto => |
|
|
|
{ |
|
|
|
a.ProductName = products[a.ProductId]; |
|
|
|
return a; |
|
|
|
}) |
|
|
|
.ToList(); |
|
|
|
orderDto.ProductName = products[orderDto.ProductId]; |
|
|
|
}); |
|
|
|
|
|
|
|
return result; |
|
|
|
return orderDtos; |
|
|
|
} |
|
|
|
|
|
|
|
public async Task CreateAsync(OrderCreationDto input) |
|
|
|
|