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"));
        }
Пример #2
0
 public ActionResult DeleteFlight(Flight flight)
 {
     flightBLayer.DeleteFlight(flight.FlightId);
     return(RedirectToAction("DisplayFlightDetails"));
 }