Skip to content

Instantly share code, notes, and snippets.

@adamdriscoll
Created February 7, 2017 03:07
Show Gist options
  • Save adamdriscoll/6273173467193eb3303bd21c14eeb3ff to your computer and use it in GitHub Desktop.
Save adamdriscoll/6273173467193eb3303bd21c14eeb3ff to your computer and use it in GitHub Desktop.
MongoDBGuid
static Repository()
{
BsonClassMap.RegisterClassMap<Model>(cm => {
cm.AutoMap();
cm.SetIdMember(cm.GetMemberMap(c => c.Id));
cm.IdMemberMap.SetIdGenerator(CombGuidGenerator.Instance);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment