public ActionResult Trip(int id) { var viewmodel = new TodoItemsDashboardViewModel(); viewmodel.NewTodoItem = new TodoItem() { TripId = id }; viewmodel.Trip = _repo.GetTrip(id); viewmodel.TodoItems = _repo.GetTodoItems(id); if (TempData["Success"] != null) { ViewBag.Success = TempData["Success"]; } if (TempData["WarningMessage"] != null) { ViewBag.WarningMessage = TempData["WarningMessage"]; } return(View(viewmodel)); }