public int Upsert(string collection, IEnumerable <BsonDocument> docs, BsonAutoId autoId) { this.OpenDatabase(); try { return(_engine.Upsert(collection, docs, autoId)); } finally { this.CloseDatabase(); } }