public bool Update(string id, Properties properties, DocumentDatabaseUpdateOptions options = null) { if (!this.ConnectionGuard()) { return(false); } var collection = this.GetDefaultCollection(this.DatabaseName, this.CollectionName); if (collection == null) { return(false); } bool rc = this.DatabaseDriver.Update <T>(collection, id, properties, options); return(rc); }
/// <summary> /// This will update the entire element in a nested array (for exaple, replacing an entire Question in a QuestionBank's Questions array) /// </summary> public bool Update <TElement>(string id, string nestedArrayElement, string idElement, TElement element, DocumentDatabaseUpdateOptions options) { if (!this.ConnectionGuard()) { return(false); } var collection = this.GetDefaultCollection(this.DatabaseName, this.CollectionName); if (collection == null) { return(false); } bool rc = this.DatabaseDriver.Update <T, TElement>(collection, id, nestedArrayElement, idElement, element, options); return(rc); }