1 Download a new ABP template project
http://www.aspnetboilerplate.com/
2 install MySQL on Windows, create a new database SampleDb
Installation documentation for HTTPS://DEV.MYSQL.COM/DOC/REFMAN/8.0/EN/MYSQL-INSTALLER-GUI.HTML-MYSQL
https://downloads.mysql.com/archives/installer/-Mysql-installer-gui's
3 Open the template project and install the MySql.Data.Entity in EntityFramework and Web projects
Install-package mysql.data.entity-version 6.8.3/install-package MySql.Data.Entity-command to install MySql.Data.Entity components
Note: Do not install the latest version of MySql.Data.Entity here, because the template project uses the. NET Framework version is 4.5.2, the corresponding MySql.Data.Entity version to use 6.8.3, if you use the latest version, the following will be an error
4 modifying the Web. config file
<EntityFrameworkCodeconfigurationtype= "MySql.Data.Entity.MySqlEFConfiguration, MySql.Data.Entity.EF6"> <defaultconnectionfactorytype= "System.Data.Entity.Infrastructure.SqlConnectionFactory, entityframework" /> <providers> <providerInvariantName= "MySql.Data.MySqlClient"type= "MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6" /> <providerInvariantName= "System.Data.SqlClient"type= "System.Data.Entity.SqlServer.SqlProviderServices, entityframework.sqlserver" /> </providers> </EntityFramework> <connectionStrings><Addname= "Default"ProviderName= "MySql.Data.MySqlClient"connectionString= "server=localhost;port=3306;database=sampledb;uid=root;password=***" /></connectionStrings>
Refer to the documentation for EF6 to MYSQL http://dev.mysql.com/doc/connector-net/en/connector-net-entityframework60.html
5 executing commands in the package Manager console Update-database–verbos
6 You can now run the ABP template project.
Using MySQL in the ABP template project