2 Replies Latest reply on Oct 23, 2013 11:32 AM by user10695526

    Error mapping database tables using Entity Framework




      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