public ActionResult Login(LoginModel model) { if (ModelState.IsValid) { var login = _authProvider.Login(model.Username, model.Password); if (login) { return RedirectToAction("Index", "Post"); } } return View(model); }
public ActionResult Login() { var model = new LoginModel(); return View(model); }