public async Task<Document> Update(Idea idea) { var ideaCollection = FindCollection("IdeaCollection", true); var docToReplace = RetrieveAsDocument(idea.Id); return await _client.ReplaceDocumentAsync(docToReplace.SelfLink, idea); }
public void Save(Idea idea) { var ideaCollection = FindCollection("IdeaCollection",true); if (ideaCollection != null) { _client.CreateDocumentAsync("dbs/" + _database.Id + "/colls/" + ideaCollection.Id, idea); } }