Пример #1
0
 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);
 }
Пример #2
0
 public ActionResult Login()
 {
     var model = new LoginModel();
     return View(model);
 }