示例#1
0
 public ActionResult SignIn(LoginViewModel vm)
 {
     Inhabitant user = _peopleRepository.GetById(vm.PESEL, vm.Password);
     Session["user"] = user;
     if (user != null)
     {
         return RedirectToAction("Index", "Inhabitant");
     }
     else
     {
         return View(vm);
     }
 }
示例#2
0
 // GET: Login
 public ActionResult Index()
 {
     LoginViewModel vm = new LoginViewModel();
     return View();
 }