Example #1
0
 public void Save(EditMemberViewModel model)
 {
     var member = _memberRepo.Find(model.MemberID) ?? new Member();
     member.Email = model.Email;
     member.LastName = model.LastName;
     member.FirstName = model.FirstName;
     if (!String.IsNullOrEmpty(model.Password) && !String.IsNullOrEmpty(model.ConfirmPassword) && model.Password.Equals(model.ConfirmPassword))
     {
         member.PasswordSalt = _security.CreateSalt();
         member.HashedPassword = _security.HashPassword(model.Password, member.PasswordSalt);
     }
     _memberRepo.Save(member);
 }
 public ActionResult Save(EditMemberViewModel model)
 {
     _service.Save(model);
     return RedirectToAction("Index");
 }