/// <summary> /// Gets all comments. /// </summary> /// <returns></returns> public List<BBlogComment> GetAllComments() { using (var datas = new BlogCommentDataManager()) { return datas .GetAllComments() .Select(x => Change(x)) .ToList(); } }
/// <summary> /// Gets the comments by post. /// </summary> /// <param name="post">The post.</param> /// <returns></returns> public List<BBlogComment> GetCommentsByPost( BBlogPost post) { using (var datas = new BlogCommentDataManager()) { return datas .GetCommentsByPostID(post.PostID) .Select(x => { var a = Change(x); a.Post = post; return a; }) .ToList(); } }