public ActionResult ConfirmFriend(UserViewModel friend) { var userId = User.Identity.GetUserId(); _userService.ConfirmFriend(userId, friend.Id); return Json(null); }
public static ApplicationUser ToApplicationUser(UserViewModel user) { Mapper.CreateMap<UserViewModel, ApplicationUser>(); return Mapper.Map<UserViewModel, ApplicationUser>(user); }
public ActionResult RemoveUserFromConversation(UserViewModel user, string conversationId) { _conversationService.RemoveUserFromConversation(user.Id, conversationId); return new EmptyResult(); }
private void UpdateUserSong(UserViewModel user) { if (user != null) { if (user.IsOnline == false) { user.SongAtThisMoment = string.Empty; user.CurrentSong = null; } var song = _musicRepository.GetSong(user.SongAtThisMoment); if (song != null) { user.CurrentSong = ModelConverters.ToSongViewModel(song); } } }
public void UpdateUser(UserViewModel userInfo) { var user = ModelConverters.ToApplicationUser(userInfo); _userRepository.UpdateUser(user); }
public JsonResult UpdateUser(UserViewModel userInfo) { _userService.UpdateUser(userInfo); return Json(new { Succes = true }, JsonRequestBehavior.AllowGet); }