Пример #1
0
        public async Task <IActionResult> Index()
        {
            var posts = await _postService.GetPosts();

            return(View(
                       posts
                       .Where(p => p.Status == Services.PostStatus.Pending)
                       .OrderByDescending(c => c.UpdatedDate)
                       .Select(p => Models.PostIndexViewModel.FromModel(p))));
        }