예제 #1
0
파일: AlHome.cs 프로젝트: sbal323/Core3Shop
        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()
            });
        }