2
Vote

problem handling Int64 and EDM.Decimal

description

Hi,
 
I have a problem about Int64 and EDM.Decimal.
 
In my case, IDs are "number" in my SSDL file, "Int64" in my CSDL file and "Long" in my objects. The problem appears when I try to add entities to database.
 
Stack Trace : System.Data.UpdateException: An error occurred while updating the entries. See the inner exception for details. ---> System.ArgumentException: The specified value is not an instance of type 'Edm.Decimal'
 
So I decided to look your EFOracleOdpProviderManifest and I fine a solution (maybe not the good one).
 
In the "GetEdmType()" method, case "number", I add :
 
if (precision == 0 && scale == 196)
 
return TypeUsage.CreateDefaultTypeUsage(PrimitiveType.GetEdmPrimitiveType(PrimitiveTypeKind.Int64));

comments