1.自定义属性类:
public class ModelPropertyAttribute : Attribute
{
bool nottablecolum;
public bool NotTableColumn { get { return this.nottablecolum; } }
public ModelPropertyAttribute(bool nottablecolums)
{
this.nottablecolum = nottablecolums;
}
public override string ToString()
{
return nottablecolum ? "nottablecolum" : "";
}
}
2.需要属性,但不属于数据库字段的时候使用
[Common.Model.ModelProperty(true)]
public decimal SendValue
{
get{ }
set{ }
}