public void Update(Document doc, Document selector, UpdateFlags flags) { UpdateMessage um = new UpdateMessage(); um.FullCollectionName = this.FullName; um.Selector = selector; um.Document = doc; um.Flags = (int)flags; try{ this.connection.SendMessage(um); }catch(IOException ioe){ throw new MongoCommException("Could not update document, communication failure", this.connection,ioe); } }
public void Update(Document doc, Document selector, int upsert) { UpdateMessage um = new UpdateMessage(); um.FullCollectionName = this.FullName; um.Selector = BsonConvert.From(selector); um.Document = BsonConvert.From(doc); um.Upsert = upsert; try{ this.connection.SendMessage(um); }catch(IOException ioe){ throw new MongoCommException("Could not update document, communication failure", this.connection,ioe); } }
public void Update(Document doc, Document selector, int upsert) { UpdateMessage um = new UpdateMessage(); um.FullCollectionName = this.FullName; um.Selector = BsonConvert.From(selector); um.Document = BsonConvert.From(doc); um.Upsert = upsert; this.connection.SendMessage(um); }