Automapper是一个很好的工具。但我有一些问题。automapper在调试模式下工作正常,但在发布模式下引发了mappingexception
在调试项目时工作正常,所有的映射操作都成功了。但在发布模式下,它会用完全相同的数据抛出mappingexception。
可能是什么问题?
我的环境是Win7,32位,VS 2010。项目适用于.net 4.0配置文件。在调试模式下
Mapper.CreateMap<V_Person_Details,Person>();
Mapper.Map(curr_V_Person, cur_Person); /// exception throws here in just release mode , not in debug mode
///Trying to map System.String to System.nullable .... Destination property SSS_ID : exception of the Automapper.AutomapperMappingException was thrown.
....
那是什么'映射异常'呢? – Tigran 2012-01-07 09:53:01
尝试将System.string映射到System.nullable'1 ...但它在调试模式下使用相同的数据正常工作。 – Yaya 2012-01-07 09:54:27
**给我**,看起来你在调试和发布中绑定到不同的'数据库'。 – Tigran 2012-01-07 09:55:55