column of type number(10,0) is mapped to .NET type 'long' and not 'int'
Posted: Tue 02 Jun 2015 06:24
I am converting a SQL db to Oracle. The SQL columns of type 'int' are converted to Oracle data types of Number(10,0).
I am using dotConnect for Oracle 'Entity Developer' to generate my Entities (EF6) in VS2013. The idea is to use the existing .NET code to use entities generated from Oracle DB. As long as Entities are same, the code should.
The issue is that when I use Entity Developer to generate Entities from the Oracle DB, the corresponding class properties are generated as .NET type of 'long' and not 'int'. So for USER table, USER_ID property is generated as .NET type 'long'.
I have lot of .NET code (c#) going against EF generated from the SQL server, where all the properties corresponding to datatype of SQL 'int' were mapped to .NET type of 'int'. So the existing code like this fails : int _userid = USER.USER_ID; //compiler error.
So the question is - is there a way to tell 'Entity developer' to make any property corresponding to Oracle Datatype 'number(10,0)' as .NET type 'int' and not 'long'?
Hope that is clear.
Thanks
Devartuser.
I am using dotConnect for Oracle 'Entity Developer' to generate my Entities (EF6) in VS2013. The idea is to use the existing .NET code to use entities generated from Oracle DB. As long as Entities are same, the code should.
The issue is that when I use Entity Developer to generate Entities from the Oracle DB, the corresponding class properties are generated as .NET type of 'long' and not 'int'. So for USER table, USER_ID property is generated as .NET type 'long'.
I have lot of .NET code (c#) going against EF generated from the SQL server, where all the properties corresponding to datatype of SQL 'int' were mapped to .NET type of 'int'. So the existing code like this fails : int _userid = USER.USER_ID; //compiler error.
So the question is - is there a way to tell 'Entity developer' to make any property corresponding to Oracle Datatype 'number(10,0)' as .NET type 'int' and not 'long'?
Hope that is clear.
Thanks
Devartuser.