Ejemplo n.º 1
0
 public PartialViewResult GetMainCategories()
 {
     using (UnitOfWorkManager.NewUnitOfWork())
     {
         var viewModel = new ListCategoriesViewModel
                             {
                                 Categories = _categoryService.GetAll().OrderBy(x => x.SortOrder)
                             };
         return PartialView(viewModel);
     }
 }
 public PartialViewResult ListAllCategories(Guid id)
 {
     using (UnitOfWorkManager.NewUnitOfWork())
     {
         var viewModel = new ListCategoriesViewModel
                             {
                                 Categories = _categoryService.GetAllSubCategories(id)
                             };
         return PartialView(viewModel);
     }
 }