Created
January 22, 2018 09:48
-
-
Save JaykeOps/549dad38b4aec0c2b897851c075f4fe6 to your computer and use it in GitHub Desktop.
MongoDB setting up basic name mapping convention
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
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