在生成代码时经常需要从DataReader转化为Entity
比如
当Reader只想取两三个字段(少于Entity的属性个数)时,如果不用try catch就会出错:
于是想到用Reflect
得方法如下
OK!