Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to operate Scaffolding in MySQL

Shulou Source: shulou.com Published: 2022-06-02 06:46:28 10月01日 Update

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.

Tags: Content data database more help good up and down context interest commands guys buddies console articles models source code directories knowledge programs articles Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Shulou Information Apple Shulou Technology vpn