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);
     }
 }