// TODO: associate telemetry data class with collection through annotation if possible /// <summary> /// Saves <see cref="TelemetryData"/> to the database. /// </summary> /// <param name="telemetry">The <see cref="TelemetryData"/> to add.</param> public async void AddTelemetryData(TelemetryData telemetry) { // TODO: check state var collection = _database.GetCollection <BsonDocument>("TelemetryData"); await collection.InsertOneAsync(telemetry.ToBsonDocument()); }