Skip to Main Content

ODP.NET

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Entity Framework mapping Oracle Number type to .NET Double

934596May 2 2012 — edited Sep 28 2012
Is it possible to map an oracle Number(38,0) to an .NET Double? For reasons beyond my control, I need the numbers to be represented as the Double type in my C# objects. I have tried overriding the configuration in app.config as follows:

<oracle.dataaccess.client>
<settings>
<add name="double" value="edmmapping number(38,0)" />
</settings>
</oracle.dataaccess.client>

When my application tries to connect to the database, I get the following error:
Schema specified is not valid:
Member Mapping specified is not valid. The type 'Edm.Double[Nullable=True,DefaultValue=]' of member 'XXX' in type 'Model.XXX' is not compatible with 'OracleEFProvider.number[Nullable=True,DefaultValue=,Precision=38,Scale=0]' of member 'XXX' in type 'Model.Store.XXX'.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 26 2012
Added on May 2 2012
4 comments
3,960 views