/// <summary> /// See interface docs. /// </summary> /// <param name="aircraft"></param> public void InsertAircraft(BaseStationAircraft aircraft) { if (!WriteSupportEnabled) { throw new InvalidOperationException("You cannot insert aircraft when write support is disabled"); } aircraft.FirstCreated = SQLiteDateHelper.Truncate(aircraft.FirstCreated); aircraft.LastModified = SQLiteDateHelper.Truncate(aircraft.LastModified); lock (_ConnectionLock) { OpenConnection(); if (_Connection != null) { aircraft.AircraftID = _AircraftTable.Insert(_Connection, _TransactionHelper.Transaction, _DatabaseLog, aircraft); } } }