Support TIMESTAMP WITH TIME ZONE columns in Oracle
Linqpad doesn't work very well if the underlying columns in an Oracle database contain TIMESTAMP WITH TIME ZONE columns.
These appear in the datacontext as DateTime (losing the offset information), however queries using equality checks against them can fail due to the way the underlying IQDriver handles (or otherwise) the conversion back to datetime offset within Oracle.
It's a bit of a pain, but one of the simple approaches is to ensure the generated SQL wraps those columns in either sysextractutc(theColumn) or 'theColumn AT TIME ZONE xxxx' to ensure they are compared with the DateTime parameter that is bound to the query.
Obviously the better solution would be to implement them 'properly' (map to / from DateTimeOffset), but that might be more complicated
-
Piers Williams commented
At the moment I just have to give up and use Dapper to query those tables from within Linqpad, which seems a bit silly.