Created
November 28, 2017 15:49
-
-
Save HamidMosalla/a5a66c3ed14dd3dc7febab033a2fd8ed to your computer and use it in GitHub Desktop.
This file contains 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] | |
public async Task<IActionResult> Detail(int id) | |
{ | |
if (id == default(int)) return BadRequest(); | |
var model = await _mediator.Send(new PortfolioByIdQuery { PortfolioId = id }); | |
if (model == null) return NotFound(); | |
var viewModel = _mapper.Map<Portfolio, PortfolioViewModel>(model); | |
return View(viewModel); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment