How to operate Scaffolding in MySQL
This article introduces you how to operate Scaffolding in MySQL, the content is very detailed, interested friends can refer to, hope to be helpful to you.
① creates a project named ScaffoldingTest:
② adds references to EF Core Tools and Pomelo:
③ here, we pre-created a database with two tables called eftests.
④, open the console, enter the program source code directory, and enter the following command
Dotnet ef dbcontext scaffold "server=localhost;uid=root;pwd=123456;database=eftests"Pomelo.EntityFrameworkCore.Mysql"-o Models
⑤ at this point we find that the model and database context classes have been automatically created:
On how to operate Scaffolding in MySQL to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.