Automapper-区分大小写 [英] Automapper - want case sensitive

查看:270
本文介绍了Automapper-区分大小写的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从这里类似的问题中,我已经阅读到AutoMapper以前是区分大小写的,但是现在不区分大小写.我希望它区分大小写-看不到任何更改此方法的方法,其他所有问题都没有说明如何做到(我确实看过).有任何想法吗?

From similar questions on here I have read here that AutoMapper used to be case sensitive, but is now case insensitive. I want it case sensitive - can't see any way to change this, and none of the other questions Re this showed how to do it (I did look). Any ideas anyone?

谢谢

推荐答案

您可以参考:

DataReaderMapper默认情况下应创建不区分大小写的映射

DataReaderMapper should create case-insensitive mappings by default

http://automapper.codeplex.com/workitem/6127

您可以在Mapper中控制它.初始化为答案 AutoMapper:IDataReader和DTO对象之间的映射

you can control this in Mapper.Initialize as the answer AutoMapper: Mapping between a IDataReader and DTO object

另一篇不错的文章,其中包含有关命名约定映射的示例:

another good post with examples on naming convention mappings: http://blog.ac-graphic.net/automapping-c-objects-from-one-naming-convention-to-an-other/

这篇关于Automapper-区分大小写的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆