This is a demo ASP.NET Core application for .NET 5 using MySql.
It's basically the starting project you can get by running:
dotnet new mvc --auth Individual --use-local-db
But it's been updated to use MySql.
- Referenced the
Pomelo.EntityFrameworkCore.MySql
andMicrosoft.EntityFrameworkCore.Design
NuGet packages; - Replaced
UseSqlServer
withUseMySql
in the Startup class; - Removed all migrations and re-generated them by running the command:
dotnet ef migrations add InitialMigration
- Create a MySql database;
- Update the connection string in the
appsettings.json
file; - Run the commands
dotnet tool install --global dotnet-ef dotnet ef database update
- Start debugging the application by pressing
F5
in Visual Studio Code and register your first user.