📅  最后修改于: 2023-12-03 15:02:57.389000             🧑  作者: Mango
Microsoft.VisualStudio.Web.CodeGeneration.Design is a package that provides scaffolding and code generators for ASP.NET Core, including generating ASP.NET Razor Pages, Controllers, and views from a Data Model structure. This package specifically focuses on generating code for ActionScript development.
To use this package, you need to open the Package Manager Console in Visual Studio and run the following commands:
Scaffold-DbContext "<your connection string>" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models
This command generates a complete model for your database tables. Then, run the following command:
dotnet aspnet-codegenerator razorpage -m <your model class name> -dc <your DbContext class name> -udl -outDir <output directory>
This command generates razor pages, controllers, and views for your model. Once the code is generated, you can easily customize it to match your specific requirements.
Microsoft.VisualStudio.Web.CodeGeneration.Design is a powerful tool that can greatly accelerate your development process in ASP.NET Core, especially for ActionScript development. By using code generation and scaffolding, you can quickly generate a complete set of views, controllers, and models for your data-driven ASP.NET Core application.