Example #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));
        }
Example #2
0
 // GET: Blog/GetPostByCategory
 public async Task<List<ForumPostViewModel>> GetPostByCategory(int id)
 {
     return await _blogPostOrder.GetAllByCategory(id);
 }