Browse Source
Merge pull request #20986 from abpframework/doc/modular-crm
Modular crm doc sample refactored
pull/20987/head
Engincan VESKE
1 year ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
12 additions and
14 deletions
-
docs/en/tutorials/modular-crm/part-06.md
-
docs/en/tutorials/modular-crm/part-07.md
|
|
|
@ -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) |
|
|
|
|
|
|
|
@ -101,15 +101,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) |
|
|
|
|