GetColumnName() 보호된 정적인 메소드

Gets the column name for the specified PropertyInfo using the default convention settings.
protected static GetColumnName ( PropertyInfo propertyInfo ) : string
propertyInfo System.Reflection.PropertyInfo The property info for the property.
리턴 string
예제 #1
0
        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());
            };
        }
예제 #2
0
        /// <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
            };
        }