I need to connect a .net application to a mysql database. When I add the tables to the model, all the columns with the type Tinyint are mapped like boolean.
After Searching in mysql forum, i add "Treat Tiny As Boolean=false" in the connection string. When I refresh the model, nothing changes. If I change the type manually to Sbyte or Int 16 I get the following error.
Error 43 Error 2019: Member Mapping specified is not valid. The type 'Edm.SByte[Nullable=True,DefaultValue=]' of member 'personacion' in type 'Model.perfiles' is not compatible with 'MySql.usmallint[Nullable=True,DefaultValue=]' of member 'personacion' in type 'Model.Store.perfiles'. C:\Proyectos\StatusXMLGenerator\StatusXMLGenerator\StatusXMLGenerator\Model.edmx 474 17 StatusXMLGenerator
Error 42 Error 2019: Member Mapping specified is not valid. The type 'Edm.Int16[Nullable=False,DefaultValue=]' of member 'id_seccion' in type 'Model.formularios' is not compatible with 'MySql.bool[Nullable=False,DefaultValue=]' of member 'id_seccion' in type 'Model.Store.formularios'. C:\Proyectos\StatusXMLGenerator\StatusXMLGenerator\StatusXMLGenerator\Model.edmx 454 17 StatusXMLGenerator
The error 42 has also an incorrect mapping. It says that the type of the column is Mysql.Bool, but in the databases, I have stored values from 1 to 10, so it should be Mysql.usmallint, like in error 43.
This is my connection string:
<add name="ModelContainer" connectionString="metadata=res://*/Model.csdl|res://*/Model.ssdl|res://*/Model.msl;provider=MySql.Data.MySqlClient;provider connection string="server=**********;user id=*******;password=*****;database=pki_2010;persistsecurityinfo=True;Treat Tiny As Boolean=false;"" providerName="System.Data.EntityClient" />
Any ideas?