Created
June 29, 2015 00:39
-
-
Save erjjones/01a921a85fb392abdfbf to your computer and use it in GitHub Desktop.
Store Data In a Workspace
This file contains hidden or 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)) | |
{ | |
// Define a new user to be registered, notice that we don't need to assign any audit column values. | |
var user = new User | |
{ | |
DocumentID = Guid.NewGuid().ToString(), | |
Username = "someusername", | |
Password = "s@m5p@ssw@rd" // Password will automatically be MD5'd using a trigger on the server. | |
}; | |
// Register the above user instance using the session provided by the Official ODataHQ SDK for .NET. :) | |
await session.RegisterUserAsync(user); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment