Created
December 22, 2016 21:04
-
-
Save dcomartin/a51b976a1f201215487aea6e30c2e7f9 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
public class HomeController : Controller | |
{ | |
private readonly IMediator _mediator; | |
public HomeController(IMediator mediator) | |
{ | |
_mediator = mediator; | |
} | |
[HttpGet("/")] | |
public async Task<IActionResult> Home() | |
{ | |
var viewModel = await _mediator.SendAsync(new Home()); | |
return View(viewModel); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment