/// <summary> /// 得到所有非主键列 /// </summary> /// <param name="columns"></param> /// <returns></returns> public static ColumnMeta GetPrimaryKeyColumn(ColumnMetaCollection columns) { return(columns.Where((col) => { return col.IsKey; }).FirstOrDefault()); }
/// <summary> /// 得到所有非主键列 /// </summary> /// <param name="columns"></param> /// <returns></returns> public static ColumnMetaCollection GetPrimaryKeyColumns(ColumnMetaCollection columns) { return(new ColumnMetaCollection(columns.Where((col) => { return col.IsKey; }))); }