private void ProcessRequestFlightDetailData(IEnumerable <FlightDetail> list, DataOP op) { if (list == null) { return; } foreach (FlightDetail g in list) { if (DataOP.AddNew == op) { g.RequestHeaderId = RequestHeader.Id; _flightDetailRepository.Add(g); } if (DataOP.DEL == op) { var user = _flightDetailRepository.GetById(g.Id); _flightDetailRepository.Delete(user); } if (DataOP.EDIT == op) { _flightDetailRepository.Update(g); } } }