New Posts New Posts RSS Feed: SByte to Bool
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

SByte to Bool

 Post Reply Post Reply
Author
gregweb View Drop Down
DevForce MVP
DevForce MVP
Avatar

Joined: 10-Sep-2009
Location: Clearwater, Fl
Posts: 253
Post Options Post Options   Quote gregweb Quote  Post ReplyReply Direct Link To This Post Topic: SByte to Bool
    Posted: 31-Dec-2010 at 8:07pm
Great thanks, this is now resolved.
 
Greg
Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Posted: 30-Dec-2010 at 3:04pm
The mapping is actually determined by your EF provider, although you can override it by modifying the EDMX directly (either through the designer or the XML). 
 
If you're using DevArt's MySQL provider, here's the default mappings:  http://www.devart.com/dotconnect/mysql/docs/DataTypeMapping.html
Back to Top
gregweb View Drop Down
DevForce MVP
DevForce MVP
Avatar

Joined: 10-Sep-2009
Location: Clearwater, Fl
Posts: 253
Post Options Post Options   Quote gregweb Quote  Post ReplyReply Direct Link To This Post Posted: 30-Dec-2010 at 2:37pm
I have a MySQL database with a bit field to hold a boolean value.  In SqlServer, these normally come through on the Entity as boolean values.  With MySQL, it comes through as an SByte.
 
I know I can use value converters to convert it to a bool, but is there a better way to do this so it's a bool on the Entity?
 
Greg
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down