Пример #1
0
        public AllPostsViewModel GetAll(int?count = null)
        {
            IQueryable <Post> posts = this.posts.All().OrderByDescending(p => p.CreatedOn);

            if (count.HasValue)
            {
                posts = posts.Take(count.Value);
            }

            var allPosts = posts.To <PostViewModel>().ToList();

            return(null);
        }