Ejemplo n.º 1
0
        public ActionResult Create()
        {
            Departure newItem = new Departure(Request.Form["new-departure"]);

            newItem.Save();
            Arrival selectedarrival = Arrival.Find(int.Parse(Request.Form["arrival"]));

            newItem.AddArrival(selectedarrival);
            List <Departure> allItems = Departure.GetAll();

            return(View("departures", allItems));
        }