public override void InsertToList(string key, string value) { if (key == null) { throw new ArgumentNullException(nameof(key)); } var listDto = new ListDto { Id = ObjectId.GenerateNewId(), Item = key, Value = value }; JobGraph.InsertOne(SessionHandle, listDto.ToBsonDocument()); _insertedLists.Add(listDto); }
public override void InsertToList(string key, string value) { if (key == null) { throw new ArgumentNullException(nameof(key)); } var listDto = new ListDto { Id = ObjectId.GenerateNewId(), Item = key, Value = value }; var writeModel = new InsertOneModel <BsonDocument>(listDto.ToBsonDocument()); _writeModels.Add(writeModel); }