Ejemplo n.º 1
0
        public ActionResult ListPostsByCategory(int id)
        {
            var ops = new BlogPostOperations();
            var vm  = new HomeIndexViewModel();

            vm.BlogPosts   = ops.GetPostsByCategoryID(id);
            vm.Categories  = ops.GetAllCategories();
            vm.StaticPages = ops.GetAllStaticPages();

            return(View("Index", vm));
        }