Created
June 13, 2013 01:04
-
-
Save schotime/5770461 to your computer and use it in GitHub Desktop.
My Postgresql conventions
This file contains 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
var conventions = FluentMappingConfiguration.Scan(scanner => | |
{ | |
scanner.Assembly(typeof(User).Assembly); | |
scanner.IncludeTypes(x=>x.Namespace.StartsWith(typeof(User).Namespace)); | |
scanner.TablesNamed(x => Inflector.MakePlural(x.Name).BreakUpCamelCaseUsing("_").ToLower()); | |
scanner.Columns.Named(x => x.Name.BreakUpCamelCaseUsing("_").ToLower()); | |
scanner.PrimaryKeysNamed(x => x.Name.BreakUpCamelCaseUsing("_").ToLower() + "_id"); | |
scanner.OverrideMappingsWith(new OverrideMappings()); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment