1. Need to install MYSQL.DATA.ENTITY.EF6, this dll can be searched online in the project-"Manage NuGet packages" MySql.Data.Entity.EF6 and can be installed
2. The connection string needs to be added providername= "Mysql.Data.MySqlClient"
3. the
"Providers"
"Provider invariantname=" System.Data.SqlClient "type=" System.Data.Entity.SqlServer.SqlProviderServices, Entityframework.sqlserver "/"
"/providers"
Replaced by
"Providers"
"Provider invariantname=" MySql.Data.MySqlClient "
Type= "MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6"/"
"/providers"
4. You can use a statement similar to the following
var menber = from P in db.accounts where p.email = = "[email protected]" && P.password = = "123456" select P;
This article is from the "wind up with the Wind Stop" blog, please be sure to keep this source http://hww9011.blog.51cto.com/3545422/1541273