Пример #1
0
        private HomeViewModel BuildHomeModel()
        {
            var repo = new Repository();
            var model = new HomeViewModel();

            model.InitHomeViewModel();
            model.nav.items = MapSectionContent(repo.GetSectionContentItems(SectionNames.Header));
            model.homeImages.items = MapSectionContent(repo.GetSectionContentItems(SectionNames.HomeImages));
            model.homeLinks.items = MapSectionContent(repo.GetSectionContentItems(SectionNames.HomeLinks));
            model.menu.items = MapSectionContent(repo.GetSectionContentItems(SectionNames.Menu));
            model.locations.items = MapSectionContent(repo.GetSectionContentItems(SectionNames.Location));
            model.jobs.items = MapSectionContent(repo.GetSectionContentItems(SectionNames.Jobs));
            model.footer.items = MapSectionContent(repo.GetSectionContentItems(SectionNames.Footer));

            return model;
        }
Пример #2
0
 public AdminController()
 {
     model = BuildHomeModel();
 }