diff --git a/docs/en/tutorials/modular-crm/part-06.md b/docs/en/tutorials/modular-crm/part-06.md index eca859a8f5..55e04259bb 100644 --- a/docs/en/tutorials/modular-crm/part-06.md +++ b/docs/en/tutorials/modular-crm/part-06.md @@ -185,15 +185,14 @@ public class OrderAppService : ApplicationService, IOrderAppService .GetProductsByIdsAsync(productIds)) .ToDictionary(p => p.Id, p => p.Name); - var result = ObjectMapper.Map, List>(orders); - result = result.Select(a => + var orderDtos = ObjectMapper.Map, List>(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) diff --git a/docs/en/tutorials/modular-crm/part-07.md b/docs/en/tutorials/modular-crm/part-07.md index de02c08fee..5ddba71421 100644 --- a/docs/en/tutorials/modular-crm/part-07.md +++ b/docs/en/tutorials/modular-crm/part-07.md @@ -101,15 +101,14 @@ public class OrderAppService : ApplicationService, IOrderAppService .GetProductsByIdsAsync(productIds)) .ToDictionary(p => p.Id, p => p.Name); - var result = ObjectMapper.Map, List>(orders); - result = result.Select(a => + var orderDtos = ObjectMapper.Map, List>(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)