Exemple #1
0
        public ActionResult Index()
        {
            var trips     = _repo.GetTrips();
            var viewModel = new TripViewModels();

            viewModel.NewTrip = new Trip();
            viewModel.Trips   = trips;
            if (TempData["Success"] != null)
            {
                ViewBag.Success = TempData["Success"];
            }
            if (TempData["WarningMessage"] != null)
            {
                ViewBag.WarningMessage = TempData["WarningMessage"];
            }
            return(View(viewModel));
        }