Exemplo n.º 1
0
 public IActionResult Login(UserViewModel user)
 {
     if (ModelState.IsValid)
     {
         _credentialsRepository.SetUser(user.ConvertTo());
         return(RedirectToAction("Index"));
     }
     else
     {
         ViewBag.Error = "Please input all fields.";
     }
     return(View(user));
 }