Example #1
0
 public IActionResult Authenticate(LoginModel login)
 {
     if (_model.Authenticate(login))
     {
         return(RedirectToAction("Index", "Rice"));
     }
     else
     {
         ModelState.AddModelError("", "Invalid username or password. Please try again.");
         return(View("Login"));
     }
 }