public IActionResult Edit(FlightModel model) { var flightUpModel = new FlightUpdateModel(); flightUpModel.UpdateFlight(model); return(RedirectToAction(nameof(FlightController.Index))); }
public IActionResult Delete(IEnumerable <int> flightIds) { var model = new FlightUpdateModel(); model.DeleteFlights(flightIds); return(Json(flightIds.Count())); }
public IActionResult Add(FlightModel flight) { if (ModelState.IsValid) { var model = new FlightUpdateModel(); model.AddNewFlight(flight); return(RedirectToAction(nameof(FlightController.Index))); } // If we got this far, something failed, redisplay form return(View(flight)); }