Click or drag to resize
IBaseStationDatabaseUpsertAircraftByCode Method
Creates or updates an aircraft record.

Namespace: VirtualRadar.Interface.Database
Assembly: VirtualRadar.Interface (in VirtualRadar.Interface.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
BaseStationAircraft UpsertAircraftByCode(
	string icao,
	Func<BaseStationAircraft, BaseStationAircraft> fillAircraft
)

Parameters

icao
Type: SystemString
The ICAO of the aircraft to create or update.
fillAircraft
Type: SystemFuncBaseStationAircraft, BaseStationAircraft
A callback that is passed the existing aircraft record or, if there is no record for the record, a partially-filled record. The callback can either return the record (optionally modified) or return null. If it returns null then the record is not inserted / changed, otherwise the record returned is written back to the database.

Return Value

Type: BaseStationAircraft
Remarks
The callback is called from within a lock, be careful not to do anything that will cause a deadlock.
See Also