Open GoogleCodeExporter opened 8 years ago
This is because Dapper uses a typeMap that maps DateTime to DbType.DateTime,
rather than DbType.DateTime2. If you've included the Dapper source, you can
change the mapping by modifying the source:
typeMap[typeof(DateTime)] = DbType.DateTime2;
If you're using a binary version of Dapper, you can change the mapping by
calling:
SqlMapper.AddTypeMap(typeof(DateTime), DbType.DateTime2)
but be aware that the AddTypeMap method is not thread-safe:
http://code.google.com/p/dapper-dot-net/issues/detail?id=165&start=100
Original comment by Jocular...@hotmail.com
on 30 Nov 2013 at 2:16
Original issue reported on code.google.com by
jonathan...@gmail.com
on 17 Oct 2013 at 10:06