数据有一个字段,用的是 tinyint 长度是1 默认值为0 ,
当用vs2013中的 EF5来生成 实体模型之后,看到这个列被标识为 bool 类型
Mysql官方参考文档关于布尔类型的说明:
BOOL, BOOLEAN
These types are synonyms(同义词) for TINYINT(1). A value of zero is considered(认为是) false. Nonzero(不为0) values are considered true
I believe I've discovered a bug in the way the MySQL Connector for .NET maps fields of type TINYINT(1) within Entity Framework.
The database I'm working with has a number of fields used to store "enumeration values" - basically an integer that represents a specific .NET enumeration value. ie/ Open = 1, Closed = 2
S