Exemple #1
0
        // GET: Blog
        public async Task <ActionResult> Index(int id)
        {
            HomePageViewModel page = new HomePageViewModel
            {
                BlogCategoy = await _blogCategoryService.GetAll(),
                GetBlogPost = await _blogPostOrder.GetAllByCategory(id)
            };

            return(View(page));
        }
 // GET: Blog/GetPostByCategory
 public async Task<List<ForumPostViewModel>> GetPostByCategory(int id)
 {
     return await _blogPostOrder.GetAllByCategory(id);
 }