Example #1
0
 public void AddUser(User user)
 {
     _userRepository.Add(user);
     _userRepository.SaveChanges();
 }
Example #2
0
 public ActionResult Register(User user)
 {
     //TODO: Add automapper using
     user.CreationDate = DateTime.Now;
     user.ActualBalance = 0;
     user.IsDeleted = false;
     _userService.AddUser(user);
     WebSecurity.Login(user.Email, user.Password, true);
     return RedirectToAction("Index", "Home");
 }