I'm developing a project using ODAC 11.2 Release 4 and Entity Framework 5.0. I have the .edmx file and I had generated the entities with template EF 5.x DbContext Generator.
The error occurs when I tried to access to one of the properties (postal code) of my entity "Adress". This column has type Number(5) in the database, but it's mapped in the entity as Short type.
I run this LINQ and I get the error: "Value was either too large or too small for an Int16"
var query = from b in this.ADRESS
List<short?> prueba = query8.ToList();
I think it was a problem with the mapping. Could you help me?
Thank you very much
First off, you should use ODAC 11.2 Release 5 or higher. That version is certified with EF 5.
Normally, Number(5) is mapped to an Int16 by default. Not sure how you have it mapped to a Short. In any case, if you want to explicitly map any data type to a non-default data type, you can use the following mapping customization described here in the doc: