摘要: 这里用到了Newtonsoft.Json,下载地址:http://json.codeplex.com/1.根据不同的Model转为对应的List 1 public static List ToList(this DataTable dt) where Model: class,new() 2 { 3 4 //创建一个属性的列表 5 List prlist = new List(); 6 //获取Model的类型实例 反射的入口 7 Type t = typeof(Model); 8 //获得Model的所有的Public ... 阅读全文
posted @ 2013-09-06 16:10 woostundy 阅读(1888) 评论(6) 推荐(0) 编辑