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:
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'.
This is a major limitation - some legacy databases I have seen use number for almost everything and change the schema or modifying the model so everything will have decimal instead of double is out of the question.
Why can't this be overridden in the app.config the way it is for integer types?
There is less of a chance of overflow with double than with int, if the cast is wrong.
Is there any way to hack this to get it working (other than using queries with casts instead of tables in EDMX)?
It is possible to get an update that enables this? (via the app.config or automatically for numbers with default precision) - This is very important to the work I am doing.
Also, the EDMX won't accept Type="BINARY_DOUBLE" (in the SSDL section)
The Type BINARY_DOUBLE is not qualified with a namespace or alias. Only PrimitiveTypes can be used without qualification.
Edit: Type should be in lower case! ("binary_double" not "BINARY_DOUBLE").
I've just download dotconnect by Devart and this provider manages correctly the mapping from Oracle Number to .NET Double.
Why the ODAC 11.2 Release 5 (22.214.171.124.20) doesn't manage .NET double type ?
When Oracle will delivered us ODAC with .NET double support ?
In my edmx I have a Decimal field that comes from a NUMBER in my database.
.NET double datatype = from ±5.0 × 10E−324 to ±1.7 × 10E308
.NET decimal datatype = (from -7.9 x 10E28 to 7.9 x 10E28) / (10E(0 to 28))
Oracle NUMBER = from 10E-84 to 10E127
How can i put 1.96629648070175438992631578947368421053579 in a .NET decimal ??? > capacity overflow