public PartialViewResult MenuLeft(String category = null, String searchText = null) { List <Category> categories = articleRepository.GetAllCategories(); List <Article> articles = articleRepository.GetAllArticles(); MenuCategoriesListViewModel model = new MenuCategoriesListViewModel(category, searchText) { Categories = Mapper.Map <List <Category>, List <MenuCategoryModel> >(categories), }; ArticleService.CalculateCategoriesCount(model.Categories, articles); return(PartialView("MenuLeftPartial", model)); }