public static IEnumerable <ContentComment> GetComments(string contentId, string commentType) { try { var result = ContentCommentRepository.GetComments(CurrentUser.Instance, Guid.Parse(contentId), commentType.ToEnum <CommentTables>()).OrderByDescending(c => c.CreatedAt).ToList(); return(result); } catch (Exception ex) { Log.Error(string.Format("Comments GetComment({0}, {1})", contentId, commentType), ex); return(null); } }
public static IEnumerable <ContentComment> GetComments(string contentId, string commentType) { try { var result = ContentCommentRepository.GetComments(CurrentUser.Instance, Guid.Parse(contentId), commentType.ToEnum <CommentTables>(), true).OrderByDescending(c => c.CreatedAt).ToList(); foreach (var contentComment in result) { contentComment.Comment = contentComment.Comment.Replace("=\"/files/", "=\"" + ConfigurationManager.AppSettings["LeadForceSiteUrl"] + "/files/"); } return(result); } catch (Exception ex) { Log.Error(string.Format("Comments GetComment({0}, {1})", contentId, commentType), ex); return(null); } }