public ActionResult RemoveActionCommentLike(ProfileActionCommentLike value) { _profileService.RemoveProfileActionCommentLike((long)value.ProfileActionCommentId, (long)_applicationManager.CurrentUser.ProfileId); var result = new LoadCommentResult { Profile = _profileService.GetShortProfile((long)_applicationManager.CurrentUser.ProfileId), ProfileActionComment = _profileService.GetProfileActionsComment((long)value.ProfileActionCommentId) }; if (result.ProfileActionComment != null) { result.Action = _profileService.GetProfileAction((long)result.ProfileActionComment.ProfileActionId); } result.Action = new ProfileAction(); return(PartialView("LoadComment", result)); }
public void AddProfileActionCommentLike(ProfileActionCommentLike comment) { using (var uow = _unitOfWorkFactory.Create()) { var actionCommentLike = uow.ProfileActionCommentLikes .Find(m => m.ProfileId == comment.ProfileId && m.ProfileActionCommentId == comment.ProfileActionCommentId) .FirstOrDefault(); if (actionCommentLike != null) { return; } uow.ProfileActionCommentLikes.Add(comment); uow.Complete(); } }