获取当前实体的属性名
public static string SelectProjectColunms<T>() { string str = ""; //获取当前实体的属性名 PropertyInfo[] pi = typeof(T).GetProperties(); foreach (PropertyInfo item in pi) { str += item.Name + ","; } return str; }
如果觉得现在晚了,那么现在还来得及。
public static string SelectProjectColunms<T>() { string str = ""; //获取当前实体的属性名 PropertyInfo[] pi = typeof(T).GetProperties(); foreach (PropertyInfo item in pi) { str += item.Name + ","; } return str; }