Entity Framework mapping Oracle Number type to .NET Double
934596May 2 2012 — edited Sep 28 2012Is 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'.