protected static GetColumnName ( |
||
propertyInfo | The property info for the property. | |
리턴 | string |
public LowercaseWithUnderscoresConventionMappingSettings() { this.ResolveColumnName = (PropertyInfo propertyInfo) => ConventionMappingSettings.GetColumnName(propertyInfo).ToUnderscored().ToLowerInvariant(); this.ResolveIdentifierColumnName = (PropertyInfo propertyInfo) => propertyInfo.Name.ToUnderscored().ToLowerInvariant(); this.ResolveTableName = (Type type) => { var tableName = UsePluralClassNameForTableName ? this.InflectionService.ToPlural(GetTableName(type)) : GetTableName(type); return(tableName.ToUnderscored().ToLowerInvariant()); }; }
/// <summary> /// Initialises a new instance of the <see cref="LowercaseWithUnderscoresConventionMappingSettings"/> class. /// </summary> public LowercaseWithUnderscoresConventionMappingSettings() { #pragma warning disable CA1308 // Normalize strings to uppercase ResolveColumnName = (PropertyInfo propertyInfo) => ConventionMappingSettings.GetColumnName(propertyInfo).ToUnderscored().ToLowerInvariant(); ResolveIdentifierColumnName = (PropertyInfo propertyInfo) => propertyInfo.Name.ToUnderscored().ToLowerInvariant(); ResolveTableName = (Type type) => { string tableName = UsePluralClassNameForTableName ? InflectionService.ToPlural(GetTableName(type)) : GetTableName(type); return(tableName.ToUnderscored().ToLowerInvariant()); #pragma warning restore CA1308 // Normalize strings to uppercase }; }