We are moving from a .NET Framework solution using Oracle’s Entity Framework provider to a .NET Core solution using Devart's EFCore provider, but have one issue I can’t seem to resolve with Devart's EFCore provider...
Our application uses an old Oracle database that stores all Date/Times with the Oracle data type of Date. We also have a data model that absolutely requires that date/time like values be .NET DateTimeOffsets. As a result, changing the Oracle type or the .NET type is not an option for us.
When mapping Oracle’s Date type to .NETs DateTimeOffset, by default, Devart's EFCore provider assumes that all of those are UTC (no offset). Its a decent assumption, but it's wrong in our case. All the date/times in this database are PST. I need a way to configure / instruct Devart to default the offset to the current time zone's offset (PST) without changing the date/time value that is coming from the database .
EFCore DateTimeOffset vs Oracle Date - Control the offset
-
- Posts: 2
- Joined: Wed 30 Jan 2019 23:26
Re: EFCore DateTimeOffset vs Oracle Date - Control the offset
We will investigate the question and notify you about the result.
Re: EFCore DateTimeOffset vs Oracle Date - Control the offset
You should create your own ValueConverter and apply it in the mapping.