Exemplo n.º 1
0
        public async Task <IHttpActionResult> Get(bool IncludeReplies = false)
        {
            IEnumerable <Topic> results;

            if (IncludeReplies == true)
            {
                results = await _repo.GetTopicIncludingRepliesAsync();
            }
            else
            {
                results = await _repo.GetTopicsAsync();
            }
            var topics = results.OrderByDescending(t => t.Created)
                         .Take(25)
                         .ToList();


            return(Ok(topics));
        }