Page 1 of 1

Datatypes in Entity Framework

Posted: Tue 25 Nov 2008 13:08
by nilssonm
Hi all,

I am wondering if it is possible to map a booelan (tinyint(1)) in the database to a .NET bool in my objectmodel.
The conversion from database type integer(11) to the .NET type Int64 also confuses me.

/Mats

Posted: Wed 26 Nov 2008 09:50
by AndreyR
The unsigned int is mapped to Int64, because it can cause an overflow of Int32.
The signed int is mapped to Int32, because when you create a column of int(11) in MySQL, it is saved in DB as the one of int(10) - that is the feature of MySQL.
The mapping of the boolean (tinyint(1)) is described in the post http://www.devart.com/forums/viewtopic.php?t=13493

Posted: Wed 26 Nov 2008 09:57
by nilssonm
Thank you for the response. I am now wondering if it is possible to manually edit the edmx file to map the unsigned int's to be Int32 instead of the automatically mapped Int64's.

/Mats

Posted: Wed 26 Nov 2008 10:52
by AndreyR
Yes, you can do it freely. But be aware of possible overflows.

Posted: Wed 26 Nov 2008 10:54
by nilssonm
OK, thanks.