-
-
Save dcomartin/80c43946d487a122b2053ba23a4d3c57 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[HttpGet("{orderId}")] | |
public async Task<IActionResult> Detail(int orderId) | |
{ | |
var viewModel = await _mediator.Send(new GetOrderDetails(User.Identity.Name, orderId)); | |
return viewModel.Match<IActionResult>( | |
some: result => View(result), | |
none: () => NotFound("Order Not Found")); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment