public ActionResult DeleteFlight(FlightModel delete) { Flight flight = AutoMapper.Mapper.Map <FlightModel, Flight>(delete); //Auto Mapper model to entity flightBL.DeleteFlight(flight); TempData["message"] = "Flight deleted successfully"; return(RedirectToAction("DisplayFlight")); }
public ActionResult DeleteFlight(Flight flight) { flightBLayer.DeleteFlight(flight.FlightId); return(RedirectToAction("DisplayFlightDetails")); }