humix
How to Create ASP.NET Core 3.0 React SPA with Secure Membership using MySQL Database in 20 Minutes
215 views · Feb 16, 2022
This tutorial uses .NET Core 3.0. Also proven to work on .NET Core 3.1 as well!
The web app has React as front end, MySQL as Database layer where the ASP.NET Identity Server 4 membership related schema will be migrated to.

Detailed Article:  https://bit.ly/2zPN385
Full Code on Github Repo : http://bit.ly/2LWgacA

00:00 Introduction
00:55 Create ASP.NET Core ]Project
02:03 Configure Project creation with React & Authentication
03:19 Delete MSSQL Server Database Migrations Directory
04:10 Uninstall Microsoft.EntityFrameworkCore.SQLServer
04:40 Install Pomelo.EntityFrameworkCore.MySql
05:50 Update all NuGet package dependencies
06:53 Update appsettings.json Connection String for MySQL database
09:07 Update Startup.CS file to use to MySQL
10:10 Build the solution
11:26 Pre-checks before creating migrations or MySQL
12:11 Add Migration to create Membership Schema scripts for MySQL
13:13 Update Database to have ASP.NET Core Membership tables in MySQL
14:07 Verify MySQL database for membership tables
14:35 Run the application
15:24 Register user and login to application
18:09 Verify for Registered User in MySQL database
20:08 Summary


Pre-Requisites
Microsoft Visual Studio 2019 Community Edition

.net core 3 https://dotnet.microsoft.com/download/dotnet-core

MySQL Tools for Visutal Studio https://dev.mysql.com/downloads/windows/visualstudio/

mysql-for-visualstudio-1.2.9.msi (https://dev.mysql.com/downloads/windows/visualstudio/)

Configurating ASP.NET Membership web app for MySQL
Step 1:
Delete Migrations Directory under the Data Directory

Step 2:
Uninstall the package Microsoft.EntityFrameworkCore.SQLServer Install the package Pomelo.EntityFrameworkCore.MySql

Step 3:
Create db in MySql

CREATE SCHEMA reactmembership;

Step 4:
Update value of DefaultConnection in appsettings.json to

server=localhost;port=3306;database=reactmembership;user=root;[email protected]$$w0Rd;CharSet=utf8

Step 5:
In Startup.cs file update ConfigureServices method to replace UseSqlServer with UseMySql

Step 6:
Tools -~ Nuget Package Manager -~ Package Manager Console

In Visual Studio, use the Package Manager Console to scaffold a new migration and apply it to the database:

Add-Migration [migration name]
Update-Database

#dotnetcore3 #mysql #IdentityServer4 #aspnet #dotnet #reactjs #authentication #mysqlauthentication
------------------------------------------------------------------------------------------------
πŸ†‚πŸ†„πŸ…±πŸ†‚πŸ…²πŸ†πŸ…ΈπŸ…±πŸ…΄ to πŸ†ƒπŸ†„πŸ†ƒπŸ…»πŸ…ΈπŸ…½πŸ…ΊπŸ†‚ channel if you like the content.

πŸ†‚πŸ†„πŸ…±πŸ†‚πŸ…²πŸ†πŸ…ΈπŸ…±πŸ…΄: http://bit.ly/2Y0ZunB

Share this video with your friends and colleagues and let them know you are upto date with latest tech-trends

Follow us: 
Facebook: http://bit.ly/2Djmd6l
Twitter: http://bit.ly/2Ol9ZQT
Instagram: http://bit.ly/2pV4cYY

Support: 
(Appreciate your Generosity: πŸ’Έ)
PayPal: http://bit.ly/2NZgVma 
ETH: 0x0689Ecd747d6F4eA9CE491aD0b1734fEe62b2229
see more

Comments

Latest Videos
place
7:48
play
How to Create a CentOS 7.5 Virtual Machine on Azure
How to Create a CentOS 7.5 Vir...
How to Create a CentOS 7.5 Virtual Machine on Azure
1 views
place
5:55
play
Installing CentOS 8.1 OS GUI on Oracle VM Virtualbox on Wind...
Installing CentOS 8.1 OS GUI o...
Installing CentOS 8.1 OS GUI on Oracle VM Virtualbox on Windows 10 OS
771 views
place
14:43
play
How to manage Python projects using Virtualenv
How to manage Python projects ...
How to manage Python projects using Virtualenv
345 views
place
5:22
play
Installing Postgres SQL on Windows PC
Installing Postgres SQL on Win...
Installing Postgres SQL on Windows PC
405 views
place
5:05
play
How to add 301 Redirect from non www to www for Wordpress
How to add 301 Redirect from n...
How to add 301 Redirect from non www to www for Wordpress
104 views
place
6:03
play
Setup Visual Studio Code for Python Development
Setup Visual Studio Code for P...
Setup Visual Studio Code for Python Development
639 views
place
6:37
play
Deploy FastAPI on Heroku in just 6 minutes
Deploy FastAPI on Heroku in ju...
Deploy FastAPI on Heroku in just 6 minutes
3K views
place
16:27
play
How to Configure ASP.NET Core 3.1 Angular SPA, Identity Serv...
How to Configure ASP.NET Core ...
How to Configure ASP.NET Core 3.1 Angular SPA, Identity Server 4 (Authentication) with PostgreSQL
139 views
place
24:40
play
Hosting Wordpress On Azure (Step by Step Tutorial)
Hosting Wordpress On Azure (St...
Hosting Wordpress On Azure (Step by Step Tutorial)
2K views
place
9:26
play
Debugging Flask App with Visual Studio Code IDE
Debugging Flask App with Visua...
Debugging Flask App with Visual Studio Code IDE
482 views