代码运行的时候,CLR会自动寻找你的TableField这个attribute对应的class,然后进行相应的方法替换。
[TableField("Tel", SqlDbType.VarChar, 30)]最终对应到你的:
public TableFieldAttribute(string sFieldName, SqlDbType oType, int iLength, bool bKey, bool IsUpdate, object oDefaultValue)
{
this._DefaultValue = null;
this._FieldName = sFieldName;
this._Type = oType;
this._Length = iLength;
this._Key = bKey;
this._IsUpdate = IsUpdate;
this._DefaultValue = oDefaultValue;
}
这个构造方法中
[TableField("Tel", SqlDbType.VarChar, 30)]最终对应到你的:
public TableFieldAttribute(string sFieldName, SqlDbType oType, int iLength, bool bKey, bool IsUpdate, object oDefaultValue)
{
this._DefaultValue = null;
this._FieldName = sFieldName;
this._Type = oType;
this._Length = iLength;
this._Key = bKey;
this._IsUpdate = IsUpdate;
this._DefaultValue = oDefaultValue;
}
这个构造方法中
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货