using Neo.Afx.Services.Comments; using Neo.Afx.Services.Comments.Entities; using System.Collections.Generic; using System.Linq; namespace Neo.LegitimateLicences.Common { public class CommentHelper { public static List GetComments(int entityID, long itemID) { var comments = new CommentsDatabase().GetComments(entityID, itemID).ToList(); return comments; } public static List GetLatestComments(int entityID, long itemID) { var comments = new CommentsDatabase().GetComments(entityID, itemID).ToList(); comments = comments.OrderByDescending(a => a.CreatedDate).Take(3).ToList(); return comments; } } }