public void CreateCopyFromExistPlan(FlightPlanOps currentPlanOps) { var records = loadOpsRecordsByPlanOpsId(currentPlanOps.ItemId); var copyPlanOps = currentPlanOps.GetCopyUnsaved(); _newKeeper.Save(copyPlanOps); var newRecords = CalculateTripForPeriod(copyPlanOps); foreach (var newRecord in newRecords) { var track = records.FirstOrDefault(i => i.FlightTrackRecordId == newRecord.FlightTrackRecordId); if (track != null) { newRecord.AircraftId = track.AircraftId; newRecord.AircraftExchangeId = track.AircraftExchangeId; } _newKeeper.Save(newRecord); } }