Summary Files Commits Branches @commit @diff @stats
path: root / src / tutorials / connect-to-mysql-in-csharp-ef / preparation.md
blob: f7ab5cae90099bb263f74972d906553eed007379 (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
[![🔗](/img/link-tabler.svg)](#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
[![🔗](/img/link-tabler.svg)](#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
[![🔗](/img/link-tabler.svg)](#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.