public ActionResult Create([Bind(Include = "TravelerID,FirstName,LastName,Email,Gender,Destination,LocalTrip,AgencyName")] Traveler traveler)
        {
            if (ModelState.IsValid)
            {
                db.Travelers.Add(traveler);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(traveler));
        }
Esempio n. 2
0
        public ActionResult Create([Bind(Include = "AgencyID,Name,Location")] Agency agency)
        {
            if (ModelState.IsValid)
            {
                db.Agencies.Add(agency);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(agency));
        }