public HomeViewModel GetHomeModel() { var allServices = _blService.GetAll(); return(new HomeViewModel() { Services = allServices.Select(x => x.ServiceModel).ToList(), Categories = _blCategory.GetAll().Where(x => allServices.Any(y => y.ServiceModel.CategoryId == x.Id)).OrderBy(x => x.Name).ToList() }); }