SafeDataReader and GetDateTimeOffset overload

SafeDataReader and GetDateTimeOffset overload

Old forum URL: forums.lhotka.net/forums/t/11450.aspx


Jaans posted on Tuesday, July 03, 2012

Hi Rocky

All the more I'm running into scenarios where DateTimeOffset is being used to store dates in SQL Server (in favour of UTC).

What are your thoughts on adding this overload to the SafeDataReader?

I believe this overload is currently specific to the SqlClient data reader, so perhaps we can have the GetDateTimeOffset() overload throw a NotSupportedException if the SafeDataReader was constructed with another type of data reader?

Maybe it's just me, but I would certainly find it useful!

Thanks,
Jaans

JonnyBee replied on Wednesday, July 04, 2012

Already registered in the bugtracker:

http://www.lhotka.net/cslabugs/edit_bug.aspx?id=937

Copyright (c) Marimer LLC