public async Task <IActionResult> Login(LoginUserCommand command) { if (ModelState.IsValid) { var result = await _mediatr.SendAsync(command); if (result.Success) { return(Redirect("/")); } ModelState.AddModelErrors(result.Errors); } return(View(command)); }
public IActionResult Login() { var model = new LoginUserCommand(); return(View(model)); }