Example #1
0
        internal object DeleteComment(int id, string userInfoId)
        {
            _repo.GetOneById(id);
            _repo.DeleteComment(id, userInfoId);
            string deleted = "Comment Deleted";

            return(deleted);
        }
Example #2
0
        public void DeleComment()
        {
            try
            {
                int commmentId = this.view.CommentId;

                commentsRepository.DeleteComment(commmentId);
                commentsRepository.Save();

                LoadViewComments();

                this.view.CommentId = 0;
            }
            catch (Exception ex)
            {
                this.view.OnError(ex.Message);
            }
        }