public static string SelectProjectColunms<T>() { string str = ""; //获取当前实体的属性名 PropertyInfo[] pi = typeof(T).GetProperties(); foreach (PropertyInfo item in pi) { str += item.Name + ","; } return str; }