/// <summary> /// Adds an activity corresponding to the rating submitted action by the logged in user /// </summary> /// <param name="value">The value of the submitted rating</param> private void AddActivity(int value) { try { var activity = new PageRatingActivity { Value = value }; activityRepository.Add(this.userId, this.pageId, activity); } catch (SocialRepositoryException ex) { AddMessage(MessageKey, new MessageViewModel(ex.Message, ErrorMessage)); } }
/// <summary> /// Add an activity for the newly added comment. /// </summary> /// <param name="comment">The added comment.</param> private void AddCommentActivity(PageComment comment) { try { var commentActivity = new PageCommentActivity { Body = comment.Body }; _activityRepository.Add(comment.AuthorId, comment.Target, commentActivity); } catch (SocialRepositoryException ex) { AddMessage(MessageKey, new MessageViewModel(ex.Message, ErrorMessage)); } }