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)); }
public void Find_ReturnsCorrectArrivalFromDatabase_Arrival() { //Arrange Arrival testArrival = new Arrival("Mow the lawn"); testArrival.Save(); //Act Arrival foundArrival = Arrival.Find(testArrival.Id); //Assert Assert.AreEqual(testArrival, foundArrival); }
public ActionResult Resultcategory() { Arrival selectedCategory = Arrival.Find(int.Parse(Request.Form["arrival"])); return(View("departures", selectedCategory.GetDeparture())); }