Skip to content

Instantly share code, notes, and snippets.

@JaykeOps
Created January 22, 2018 09:48
Show Gist options
  • Save JaykeOps/549dad38b4aec0c2b897851c075f4fe6 to your computer and use it in GitHub Desktop.
Save JaykeOps/549dad38b4aec0c2b897851c075f4fe6 to your computer and use it in GitHub Desktop.
MongoDB setting up basic name mapping convention
public static void Main(string[] args)
{
//Needs to be configured before we start handling MongoDB
var conventionPack = new ConventionPack();
conventionPack.Add(new CamelCaseElementNameConvention());
ConventionRegistry.Register("camelCase", conventionPack, typesAppliedTo => true);
//typesAppliedTo => true will apply the convention to all types.
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment