标签:
通过继承User<TEntity>类增加一个字段
/// <summary>用户信息</summary>
[Serializable]
[ModelCheckMode(ModelCheckModes.CheckTableWhenFirstUse)]
[BindIndex("IX_User_DepartmentId", false, "DepartmentId")]
[BindRelation("DepartmentId", false, "Department", "ID")]
public partial class Users : User<Users>
{
private Int32 _DepartmentId;
/// <summary>部门编号</summary>
[DisplayName("部门编号")]
[Description("部门编号")]
[DataObjectField(false, false, true, 10)]
[BindColumn(14, "DepartmentId", "部门编号", null, "int", 10, 0, false)]
public virtual Int32 DepartmentId
{
get { return _DepartmentId; }
set { if (OnPropertyChanging("DepartmentId", value)) { _DepartmentId = value; OnPropertyChanged("DepartmentId"); } }
}
}
class EMSManageProvider : ManageProvider<Users> { }
标签:
原文地址:http://www.cnblogs.com/Jeffiy/p/4545456.html