Beispiel #1
0
 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);
     }
 }
Beispiel #2
0
 public IEnumerable<Reply> GetAllReplies(int postId, ReplyEnum type, int offset, int limit)
 {
     return _mainPostQueryService.GetAllReplies(postId, type, offset, limit);
 }