public IEnumerable<Reply> GetAllReplies(int postId, ReplyEnum type, int offset, int limit) { if (offset == 0 && limit == 0) { return ctx.Posts.OfType<Reply>().Where(t => t.MainPostId == postId && t.Type == type); } else { return ctx.Posts .OfType<Reply>() .Where(t => t.MainPostId == postId && t.Type == type) .OrderBy(t => t.DateCreated) .Skip(offset) .Take(limit); } }
public IEnumerable<Reply> GetAllReplies(int postId, ReplyEnum type, int offset, int limit) { return _mainPostQueryService.GetAllReplies(postId, type, offset, limit); }