2012年6月30日

利用泛型和反射,将从数据库select出来的集合直接转换成对象

摘要: 现在的版本是直接利用反射的,下一步将改编成利用快速反射public static T ExcuteEntity<T>(SQLiteCommand cmd) { Type entityType = typeof(T); PropertyInfo[] fieldinfos = entityType.GetProperties(); T entity = (T)Activator.CreateInstance(entityType); DbDataReader reader = null; ... 阅读全文

posted @ 2012-06-30 17:55 萌二&威比 阅读(370) 评论(0) 推荐(0) 编辑

导航