Exemple #1
0
        public ActionResult New(TripViewModel trip)
        {
            if (!ModelState.IsValid)
            {
                return(View(trip));
            }

            var newTrip = _tripService.CreateNewTrip(Mapper.Map <Trip>(trip));

            return(RedirectToAction("Browse", new { id = newTrip.Id }));
        }