Skip to content

Commit 7611877

Browse files
OrderController Recommendation
It's good idea to take advantage of GetOrderByIdQuery and handle by GetCustomerByIdQueryHandler
1 parent e05a876 commit 7611877

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/Services/Ordering/Ordering.API/Controllers/OrdersController.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ public async Task<ActionResult> GetOrderAsync(int orderId)
8080
{
8181
try
8282
{
83+
//Todo: It's good idea to take advantage of GetOrderByIdQuery and handle by GetCustomerByIdQueryHandler
84+
//var order customer = await _mediator.Send(new GetOrderByIdQuery(orderId));
8385
var order = await _orderQueries.GetOrderAsync(orderId);
8486

8587
return Ok(order);
@@ -117,4 +119,4 @@ public async Task<ActionResult<OrderDraftDTO>> CreateOrderDraftFromBasketDataAsy
117119
return await _mediator.Send(createOrderDraftCommand);
118120
}
119121
}
120-
}
122+
}

0 commit comments

Comments
 (0)