public ActionResult Login(Users users) { var result = _loginRepository.ConsultarLogin( users.UserName, users.Password); if (result > 0) { return(View("~/Views/Home/HomeView.cshtml")); } else { ViewBag.Error = "Usuário e/ou senha incorretos"; return(View("Index")); } }