庹庹

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2011年4月2日

摘要: 在项目开发中,我用这个方法从数据库读取数据封装实体类,减少体力代码量,犹其是一个类字段特多时。但我不知道这样会有什么问题,请大家指点,共同进步呀。1.EntityHelper:using System;using System.Collections.Generic;using System.Data;using System.Reflection;namespace Tuo.Dao{ public class EntityHelper { public static T GetEntity<T>(DataTable table) where T : new() { T entit 阅读全文
posted @ 2011-04-02 22:01 庹林 阅读(661) 评论(0) 推荐(0) 编辑