Created
June 29, 2015 00:41
-
-
Save erjjones/d253cf83d9e9a74966c0 to your computer and use it in GitHub Desktop.
Store Data In a Workspace Then Delete
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create a session for the workspace specified in the configuration. | |
using (var session = new WorkspaceSession(configuration)) | |
{ | |
// We'll authenticate using standard workspace token authentication with an example user. | |
await session.AuthenticateAsync("{username}", "{password}"); | |
var anonymousDocument = new AnonymousCollection | |
{ | |
DocumentID = Guid.NewGuid().ToString(), | |
Name = "Example Inserted Document" | |
}; | |
var result = await session.InsertDocumentAsync(anonymousDocument); | |
// Lets clean-up the document we created. | |
await session.DeleteDocumentAsync<AnonymousCollection>(anonymousDocument.DocumentID); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment