/// <summary> /// 根据字段状态获取字段成员 /// </summary> /// <param name="pis"></param> /// <param name="filter">字段状态</param> /// <param name="isIdentity">是否包含主键</param> /// <returns></returns> public static List <string> GetTableColumns(PropertyInfo[] pis, ColumnKeyType filter, ref List <PropertyInfo> proList) { List <ColumnKeyType> list = new List <ColumnKeyType>(); list.Add(filter); return(GetTableColumns(pis, list, ref proList)); }
/// <summary> /// 判断实体是否对应字表 /// </summary> /// <param name="isSub"></param> /// <param name="tableName"></param> public PropertyAttribute(bool isSub, string tableName) { this.columnKeyType = ColumnKeyType.Default; this.IsSub = true; this.TableName = tableName; }
/// <summary> /// /// </summary> /// <param name="columnKeyType">字段状态</param> public PropertyAttribute(ColumnKeyType columnKeyType) { this.columnKeyType = columnKeyType; }
/// <summary> /// 重构方法默认值 /// </summary> public PropertyAttribute() { this.columnKeyType = ColumnKeyType.Default; }
// is column a FK internal static bool IsFK(this ColumnKeyType key) { return(key == ColumnKeyType.FK || key == ColumnKeyType.RKFK); }