【发布时间】:2014-12-19 20:37:28
【问题描述】:
Automapper 是一个很好的工具。但我有一些问题。
在调试项目时它工作正常,所有映射操作都成功。但在发布模式下,它会抛出具有完全相同数据的映射异常。
可能是什么问题?
我的环境是 Win7 , 32 bit, 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.
....
【问题讨论】:
-
mapping exception是关于什么的? -
试图将 System.string 映射到 System.nullable'1 ...但它在调试模式下使用相同的数据工作正常。
-
对我来说,您似乎在调试和发布中绑定到不同的
databases。
标签: c# automapper