// GET: Home public ActionResult Index() { HomeViewModel model = new HomeViewModel { RoomTypesList = _roomTypesManagement.GetAll().OrderBy(m => m.OrderSort).ToList(), //Get All Room Types ServicesList = _servicesManagement.GetAll().OrderBy(m => m.OrderSort).ToList(), //Get All Additional Services PostsList = _postsManagement.GetAll().OrderByDescending(m => m.CreatedAt).Take(3).ToList(), Page = _pagesManagement.Get(m => m.Name == "About"), //Get About Page TestimonialsList = _testimonialsManagement.GetAll(m => m.IsShow == true).OrderBy(m => m.OrderSort).ToList() //Get All Showable Testimonials //TestimonialsList = _testimonialsManagement.GetAll(m => m.IsShow == true).Join(, t => t.CustomerID, c => c.ID, (t, c) => new { t, c }).OrderBy(m => m.OrderSort).ToList() //Get All Showable Testimonials }; List <string> CountryList = new List <string>(); CultureInfo[] CInfoList = CultureInfo.GetCultures(CultureTypes.SpecificCultures); foreach (CultureInfo CInfo in CInfoList) { RegionInfo R = new RegionInfo(CInfo.LCID); if (!(CountryList.Contains(R.EnglishName))) { CountryList.Add(R.EnglishName); } } CountryList.Sort(); ViewBag.CountryList = CountryList; return(View(model)); }
public ActionResult Index() { AboutViewModel model = new AboutViewModel { ServicesList = _servicesManagement.GetAll().OrderBy(m => m.OrderSort).ToList(), //Get All Additional Services Page = _pagesManagement.Get(m => m.Name == "About"), //Get About Page TestimonialsList = _testimonialsManagement.GetAll(m => m.IsShow == true).OrderBy(m => m.OrderSort).ToList() //Get All Showable Testimonials }; return(View(model)); }
// GET: Blog public ActionResult Index() { BlogViewModel model = new BlogViewModel { PostsList = _postsManagement.GetAll().OrderByDescending(m => m.CreatedAt).ToList(), Setting = _settingsManagement.Get(m => m.Name == "hotel.name"), Page = _pagesManagement.Get(p => p.Name == "blog-banner") }; return(View(model)); }