Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否有任何受支持的方法可以使用 nhibernate 将 SQL 2008 中的新数据类型 datetimeoffset 映射到 System.DateTimeOffset?
NH 2.1(或从 NHibernate 主干编译)支持这一点以及更多开箱即用的功能。看看这个
(假设 google 没有关闭任何东西)您可能需要创建一个简单的 IUserType 来处理这个问题,而且我相信 NH 团队会很乐意接受它作为每个人都受益的补丁。
Ayende 在这方面有一个很好的帖子。他通过了几个选项来解决他的问题,所以你可能想从帖子的底部(而不是评论)开始,然后往上走。