2017年5月22日

AutoMapper中用户自定义转换

摘要: Custom Type Converters Sometimes, you need to take complete control over the conversion of one type to another. This is typically when one type looks 阅读全文

posted @ 2017-05-22 11:16 漫思 阅读(1341) 评论(0) 推荐(0)

AutoMapper指定列名进行映射

摘要: 有了AutoMapper,就再也不用进行手工一对一的从IDataReader到实体字段的赋值。这篇博文是一个实际案例的记录。 实体类型定义如下: Src属性在数据库中对应的字段名为ImageUrl。 映射要求:从IDataReader到IEnumerable<UploadImage>,代码如下: 通 阅读全文

posted @ 2017-05-22 10:32 漫思 阅读(3965) 评论(0) 推荐(0)

导航