entity framework - EF EDM Builder Oracle Number(1, 0) -> Int16/Bool -


i using ef oracle database. 1 of our columns in database has data type of number(1,0). field stores data translates int16 in c#. entity data model (edm) builder in visual studio maps column bool default. causing data type errors. want configure model generator set number(1, 0) int16 field time instead of bool.

how this.

i want mention when fellow developer builds model on machine set int16 (short). when on machine bool. cant figure out why 1 of see's different results other.

thanks

assuming using oracle's provider (aka odac, odp.net, odt)...

you can add custom mapping section app.config files of both assembly containing edmx (for design time) , executable assembly (for run time) change default mappings.
see more details here.

e.g.

<oracle.dataaccess.client>     <settings>         <add name="int16" value="edmmapping number(1,0)" />     </settings> </oracle.dataaccess.client> 

take account range of number(1,0) -9..9 not suitable int16 or bytes (both have larger range).

you can find a list of recommended mappings here.

edit:

for newer managed provider's settings see my answer here


Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -