示例#1
0
        private ContactsIndexViewModel GetIndexViewModel()
        {
            var cafes = cafeRepository.GetCompanyCafes(ContentItemIdentifiers.CAFES, 4);

            return(new ContactsIndexViewModel
            {
                CompanyContact = GetCompanyContactModel(),
                CompanyCafes = GetCompanyCafesModel(cafes)
            });
        }
示例#2
0
        public ActionResult Index()
        {
            var section      = dataContextRetriever.Retrieve <TreeNode>().Page;
            var companyCafes = cafeRepository.GetCompanyCafes(section.NodeAliasPath, 4);
            var partnerCafes = cafeRepository.GetPartnerCafes(section.NodeAliasPath);

            var model = new CafesIndexViewModel
            {
                CompanyCafes = GetCompanyCafesModel(companyCafes),
                PartnerCafes = GetPartnerCafesModel(partnerCafes)
            };

            return(View(model));
        }