Beispiel #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();
     }
 }
Beispiel #2
0
 public ActionResult UpdateUser(UserViewModel user, string returnUrl = "/")
 {
     userService.SaveUser(user);
     return Json(new { result = "Redirect", url = returnUrl });
 }
Beispiel #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();
 }