Example #1
0
 /// <summary>
 /// Bans the user.
 /// </summary>
 /// <param name="user">The user.</param>
 public void BanUser(UserViewModel user)
 {
     ApplicationUser userDAL = Mapper.Map<ApplicationUser>(user);
     if (userDAL != null)
     {
         unitOfWork.UserRepository.Update(userDAL);
         unitOfWork.Save();
     }
 }
Example #2
0
 public ActionResult UpdateUser(UserViewModel user, string returnUrl = "/")
 {
     userService.SaveUser(user);
     return Json(new { result = "Redirect", url = returnUrl });
 }
Example #3
0
 /// <summary>
 /// Saves the user.
 /// </summary>
 /// <param name="user">The user.</param>
 public void SaveUser(UserViewModel user)
 {
     user.ImageLink = imageService.UploadProfileImage(user.ImageLink);
     ApplicationUser userDAL = Mapper.Map<ApplicationUser>(user);
     unitOfWork.UserRepository.Update(userDAL);
     unitOfWork.Save();
 }