Пример #1
0
 public void Save(User model)
 {
     model.Id = base.Save(model);
 }
Пример #2
0
 public ActionResult Login()
 {
     var user = new User();
     return View(user);
 }
Пример #3
0
 public ActionResult Login(User user)
 {
     if (!_userRepository.Login(user.Email, user.Password, true))
     {
         throw new Exception("Invalid login");
     }
     return RedirectToAction("Index");
 }
Пример #4
0
 public new ActionResult User(User model)
 {
     _userRepository.Save(model);
     return RedirectToAction("Users");
 }