private BlogDetails GetBlogDetails(BlogDetailDisplay bd, User author, Comment[] comments, int?userrating) { return(new BlogDetails { Id = bd.blog.BlogID, Author = author, AuthorDesc = bd.AuthorDesc, Brief = blogUtil_.GetFirstLine(bd.blog, true).ToString(), CategoryId = bd.blog.CategoryID, ParentCategoryId = categoryUtil_.GetParentCategoryId(bd.blog.CategoryID), Content = BlogHelper.ReplaceContentImage(bd.blog), CreateDate = bd.blog.BlogDate, ImageUrls = bd.blog.IsLocalImg ? bd.blog.ImagePath?.Split(';') : new[] { bd.blog.ImagePath }, ThumbUrl = BlogHelper.firstImgPath(bd.blog, true), Links = BlogHelper.GetBlogLink(bd.blog.Links), IsApproved = bd.blog.isApproved, LockTags = bd.Option.LockTags, NoComment = bd.Option.NoComment, NoRate = bd.Option.NoRate, Rating = ratingUtil_.GetRating(bd.blog.BlogID), Tags = bd.tag.ToDictionary(t => t.TagID, t => t.TagName), Title = bd.blog.BlogTitle, VisitCount = bd.blog.BlogVisit, TopComments = comments, IsFavorite = bd.IsFavorite, UserRating = userrating, }); }