简体   繁体   中英

How to connect ASP.NET Core 2.2 Razor pages with MySql database?

I'm developing an ASP.NET Core razor pages website since I'm a beginner. I'm trying to connect my web application with MySql database. Since I'm a beginner I don't really know how to connect my application with MySql database. I know how to connect with SQL Server, but I want to know about connecting to MySql.

A complete working process with MySql and Asp.Net core 2.2 Razor pages would be much appreciated.

I suggest you take a look at Setup Entity Framework Core for MySQL in ASP.NET Core 2 , as it covers the basics on how to use MySQL with ASP.Net Core 2 .

Just make sure you also take a look at MySql.Data.EntityFrameworkCore , Oracle's official package for .Net Core , instead of using Pomelo's (used it in the past, but if there's an official one, it worth a check).

Hope it helps!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM