public IEnumerable <Topic> Get() { var topics = _repo.GetTopicsIncludingReplies().OrderBy(t => t.Created) .Take(25) .ToList(); return(topics); }
public IEnumerable <Topic> Get(bool includeReplies = false) { IQueryable <Topic> results; if (includeReplies == true) { results = _repo.GetTopicsIncludingReplies(); } else { results = _repo.GetTopics(); } var topics = results.OrderByDescending(t => t.Created) .Take(25) .ToList(); return(topics); }
public IEnumerable <Topic> Get(bool includeReplies = false) { IEnumerable <Topic> results; if (includeReplies) { results = _repo.GetTopicsIncludingReplies().OrderByDescending(t => t.Created).Take(25).ToList(); } else { results = _repo.GetTopics().OrderByDescending(t => t.Created).Take(25).ToList(); } return(results); }
public IEnumerable <Topic> Get(bool includeReplies = false) { IQueryable <Topic> results; if (includeReplies) { results = _messageBoardRepository.GetTopicsIncludingReplies(); } else { results = _messageBoardRepository.GetTopics(); } return(results.OrderByDescending(t => t.Created) .Take(25) .ToList()); }
public IEnumerable <Topic> Get(bool IncludeReplies = false) { IQueryable <Topic> result; if (IncludeReplies) { result = _repo.GetTopicsIncludingReplies(); } else { result = _repo.GetTopics(); } var topics = result.OrderByDescending(t => t.Created).Take(25); return(topics); }