c# - Visual Studio 2017 and MySQL EntityFramework -
when adding new ado.net entity data model
> ef designer database
> new connection
> change connection
not see mysql option;
i have installed nuget package mysql.data.entity (as required mysql.data , google.protobuf).
also when add package mysql.data.entity, existing ms sql entities returns error message;
system.typeloadexception: 'inheritance security rules violated type: 'mysql.data.mysqlclient.mysqlproviderservices'. derived types must either match security accessibility of base type or less accessible.'
yet in app.config still pointing ms sql;
<add name="mydbentities" connectionstring="metadata=res://*/myentity.csdl|res://*/myentity.ssdl|res://*/myentity.msl;provider=system.data.sqlclient;provider connection string="data source=mssqlserver;initial catalog=mydb;persist security info=true;user id=sa;password=mypassword;multipleactiveresultsets=true;app=entityframework"" providername="system.data.entityclient" />
if remove nuget package mysql.data.entity , change nothing works correctly.
Comments
Post a Comment