// Populate a new HomeIndexViewModel instance to Home/Index view public ActionResult Index(string searchKeyword) { // Search: if (!String.IsNullOrEmpty(searchKeyword)) { return(RedirectToAction("Search", "Books", new { keyword = searchKeyword })); } var homeIndexVM = new HomeIndexViewModel(); homeIndexVM.FullSetUp(db); return(View(homeIndexVM)); }