摘要: 通过实例化参数,对属性赋值,将对象作为参数传入,反射获取对象名称,列名,列值。要求对象名与表名一致,属性与列名一致。 阅读全文
posted @ 2018-10-12 13:41 旭_东 阅读(998) 评论(0) 推荐(0) 编辑
摘要: public static string QueryByEntity(T t) where T : new() { string resultstr = string.Empty; MySqlDataReader reader = null; try { Type type = typeof(T); PropertyInfo[] p... 阅读全文
posted @ 2018-10-12 13:30 旭_东 阅读(680) 评论(0) 推荐(0) 编辑