Exemple #1
0
        public string AddCommentToPost(string title, string content, int postId, string authorId)
        {
            string result = FAIL;

            try
            {
                if (commentRepository.AddCommentToPost(title, content, postId, authorId))
                {
                    result = SUCCESS;
                }
            }
            catch (Exception ex)
            {
                ex.LogExceptionToFile();
                throw new Exception(ex.Message);
            }
            return(result);
        }