This discussion is archived
2 Replies Latest reply: Oct 23, 2013 4:32 AM by user10695526 RSS

Error mapping database tables using Entity Framework

user10695526 Newbie
Currently Being Moderated



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


                         select b.PC;


          List<short?> prueba = query8.ToList();



I think it was a problem with the mapping. Could you help me?


Thank you very much


  • Correct Answers - 10 points
  • Helpful Answers - 5 points