Entity Framework Database-First mapping to DateTimeOffset

Entity Framework Database-First mapping to DateTimeOffset

Postby avalor » Tue 18 Feb 2014 17:43

I'm just evaluating dotConnect for Oracle. When trying to build a EDMX model (Database first) with EF5 (planning to upgrade to EF6 later), I've been able to sort many 'problems' with mappings (numbers precision and geometry to geography), but I can't find a way to get a TIMESTAMP WITH TIME ZONE column to be mapped to a DateTimeOffset instead of DateTime.

How can I achieve that?
avalor
 
Posts: 15
Joined: Tue 18 Feb 2014 17:39

Re: Entity Framework Database-First mapping to DateTimeOffset

Postby Shalex » Thu 20 Feb 2014 15:18

Currently the TIMESTAMP WITH TIME ZONE column is mapped to:
a) DateTime by EDM Wizard (the ADO.NET Entity Data Model item, *.edmx)
b) DateTimeOffset by Entity Developer (the Devart Entity Model item, *.edml)

We will investigate the issue with EDM Wizard and notify you about the result.

A workaround with EDM Wizard: change the datatype in the model manually.

We recommend using Entity Developer tool which has a lot of advantages comparing to a standard EDM Wizard/Designer: http://www.devart.com/entitydeveloper/ed-vs-edm.html.
Shalex
Devart Team
 
Posts: 7377
Joined: Thu 14 Aug 2008 12:44

Re: Entity Framework Database-First mapping to DateTimeOffset

Postby Shalex » Fri 07 Mar 2014 09:22

The behaviour is changed in the latest (8.3) version of dotConnect for Oracle: now the TIMESTAMP WITH TIME ZONE column is mapped to DateTimeOffset instead of DateTime by EDM Wizard / Lightswitch / Entity Framework 6 Tools. For more information, please refer to http://forums.devart.com/viewtopic.php?f=1&t=29102.

The new build can be downloaded from http://www.devart.com/dotconnect/oracle/download.html (trial version) or from Registered Users' Area (for users with active subscription only).
Shalex
Devart Team
 
Posts: 7377
Joined: Thu 14 Aug 2008 12:44

Re: Entity Framework Database-First mapping to DateTimeOffset

Postby avalor » Fri 07 Mar 2014 12:36

Hi! I just tested the new version and it works perfectly.

Thank you so much!! :D
avalor
 
Posts: 15
Joined: Tue 18 Feb 2014 17:39


Return to dotConnect for Oracle