Skip to content

Instantly share code, notes, and snippets.

@erjjones
Created June 29, 2015 00:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erjjones/01a921a85fb392abdfbf to your computer and use it in GitHub Desktop.
Save erjjones/01a921a85fb392abdfbf to your computer and use it in GitHub Desktop.
Store Data In a Workspace
// 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