blob: 438345424953424b445248416c5b6a2f5a13fc2e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# Connect to MySql in C# and Entity Framework - Preparation
[🔗](#Connect%20to%20MySql%20in%20C#%20and%20Entity%20Framework%20-%20Preparation)
**Article Created: 21 May 2020** || **Last Edited: 25 November 2020**
[`< Introduction`](./introduction.html) || [`Connecting >`](./connecting.html)
---
## MySql
[🔗](#MySql)
This tutorial doesn't cover it, but you'll need to have properly [installed and configured](https://dev.mysql.com/doc/mysql-installation-excerpt/5.7/en/) `MySQL`.
## NuGet packages
[🔗](#NuGet%20packages)
You'll need to install two NuGet packages: [Microsoft.EntityFrameworkCore](https://www.nuget.org/packages/Microsoft.EntityFrameworkCore) and [MySql.Data.EntityFrameworkCore](https://www.nuget.org/packages/MySql.Data.EntityFrameworkCore/).
[Microsoft.EntityFrameworkCore](https://www.nuget.org/packages/Microsoft.EntityFrameworkCore) is the [object-relational mapping](https://en.wikipedia.org/wiki/Object%E2%80%93relational_mapping) implementation we'll be using. It doesn't offer the specifics for connecting to a `MySQL` database, but it does everything else.
[MySql.Data.EntityFrameworkCore](https://www.nuget.org/packages/MySql.Data.EntityFrameworkCore/) is what enables Microsoft.EntityFrameworkCore to connect to a `MySQL` database.
|