本文整理汇总了C#中IPropertyInstance.Column方法的典型用法代码示例。如果您正苦于以下问题:C# IPropertyInstance.Column方法的具体用法?C# IPropertyInstance.Column怎么用?C# IPropertyInstance.Column使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IPropertyInstance
的用法示例。
在下文中一共展示了IPropertyInstance.Column方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Apply
public void Apply(IPropertyInstance instance)
{
if (instance.Property.IsNotNull())
{
instance.Column(instance.Property.Name.ToCamelCase());
}
}
示例2: Apply
public void Apply(IPropertyInstance instance)
{
var abbreviation = AttributeHelper.GetTypeAttribute<AbbreviationAttribute>(instance.EntityType);
var columnName = abbreviation == null
? instance.Name
: abbreviation.Abbreviation + instance.Name;
instance.Column(columnName.EscapeColumnName());
}
示例3: Apply
/// <summary>
/// Applies this column name convention to the specified <see cref = "IPropertyInstance" />.
/// </summary>
/// <param name="instance">An <see cref = "IPropertyInstance" />.</param>
public void Apply(IPropertyInstance instance)
{
if (instance == null)
{
throw new ArgumentNullException("instance");
}
instance.Column(instance.Property.Name);
}
示例4: Apply
/// <summary>
/// Applies the column name based on type.
/// </summary>
/// <param name="instance">The instance.</param>
public void Apply( IPropertyInstance instance )
{
if ( !instance.Property.DeclaringType.IsNHibernateComponent () )
{
if ( instance.Property.PropertyType.IsEnum ||
instance.Property.PropertyType.IsNullableEnum () )
{
var columnName = GetColumnNameForEnum ( instance.Property.Name );
instance.Column ( columnName );
}
}
}
示例5: Apply
public void Apply(IPropertyInstance instance)
{
instance.Column(instance.Name);
StringConvention(instance);
}
示例6: Apply
public void Apply(IPropertyInstance instance)
{
var propName = Inflector.Underscore(instance.Name.ToLower());
instance.Column(propName);
}
示例7: Apply
public void Apply(IPropertyInstance instance)
{
instance.Column(NameConventions.ReplaceCamelCaseWithUnderscore(instance.Name));
}
示例8: Apply
public void Apply(IPropertyInstance instance)
{
instance.Column(instance.Name + "XX");
}
示例9: Apply
public void Apply(IPropertyInstance instance)
{
var name = NameConventions.ReplaceCamelCaseWithUnderscore(instance.Name);
instance.Column(name.ToUpper());
}
示例10: Apply
public void Apply(IPropertyInstance instance)
{
instance.Column("prop-col");
}
示例11: Apply
public void Apply(IPropertyInstance instance)
{
instance.Column(StringHelper.ToLowerUnderscored(instance.Property.Name));
}
示例12: Apply
public void Apply(IPropertyInstance instance)
{
string columnName = GetColumnName(instance.Property.Name);
instance.Column(columnName);
}
示例13: Apply
public void Apply(IPropertyInstance instance)
{
instance.Column(Inflector.Underscore(instance.Property.Name));
}
示例14: Apply
public void Apply(IPropertyInstance instance)
{
instance.Column(instance.Name.ToDatabaseName());
}
示例15: Apply
public void Apply(IPropertyInstance instance)
{
instance.Column(instance.Property.Name.ToUpper());
}