private ContactsIndexViewModel GetIndexViewModel() { var cafes = cafeRepository.GetCompanyCafes(ContentItemIdentifiers.CAFES, 4); return(new ContactsIndexViewModel { CompanyContact = GetCompanyContactModel(), CompanyCafes = GetCompanyCafesModel(cafes) }); }
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)); }