From:http://www.1234.sh/post/pomelo-data-mysql?utm_source=tuicool&utm_medium=referral
Source
Source code Open source in GitHub with the MIT protocol:
Pomelo.Data.MySql
Pomelo.EntityFrameworkCore.MySql
Background
On a whim, I wanted to implement the MySQL ADO layer in. NET core and interface with the entity Framework Core, and also to despise the opportunity for a vendor to borrow at a time when Oracle officially didn't support the. NET Core. Then also to learn about Microsoft's Entity Framework principles, so this package was born, this package will be at the end of July in GitHub open source, welcome small partners to contribute.
Getting Started
nuget.config file (to be released to NuGet Gallery at the end of this month):
<?xml version="1.0" encoding="utf-8"?> <configuration> <packageSources> <add key="nuget.org" value="https://www.nuget.org/api/v2/" /> <add key="Pomelo" value="https://www.myget.org/F/pomelo/api/v2/" /> </packageSources> <disabledPackageSources /> </configuration>
MySQL ADO
Add Pomelo.Data.MySql in Project.json, version 1.0.0.
MySQL Entity Framework Core
1. Add Pomelo.EntityFrameworkCore.MySql in Project.json
"POMELO.ENTITYFRAMEWORKCORE.MYSQL" : "1.0.0" ,
2, configuring POMELO.ENTITYFRAMEWORKCORE.MYSQL
in Startup
services. adddbcontext<yourcontext> (x = x.usemysql ( "server=localhost;database= Yourdb;uid=root;pwd=yourpwd "));
Sample
In order to allow the small partners to better understand the pomelo MySQL for Entity Framework Core, here is attached yuukoblog MySQL version of the source code: https://github.com/Kagamine/ Yuukoblog-netcore-mysql
World Premiere free MySQL for Entity Framework Core