Skip to content

Instantly share code, notes, and snippets.

@darkiri
Created July 12, 2012 19:44
Show Gist options
  • Save darkiri/3100444 to your computer and use it in GitHub Desktop.
Save darkiri/3100444 to your computer and use it in GitHub Desktop.
Optimistic Concurrency MongoDB
var events = db.GetCollection("events");
events.Insert(new Event {Id = "1", Payload = 2});
events.Insert(new Event {Id = "1", Payload = 3}, SafeMode.True);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment