【.Net Core】DotNet CLI command (使用命令创建Controller、View等)

官方文档地址:>>>https://docs.microsoft.com/en-us/aspnet/core/fundamentals/tools/dotnet-aspnet-codegenerator?view=aspnetcore-3.1

版本: dotnet core 3.1

PS:需要安装nuget package

dotnet add package Microsoft.VisualStudio.Web.CodeGeneration.Design --version 3.1.0

安装

spnet-codegenerator

dotnet tool install -g dotnet-aspnet-codegenerator

Add Controller 

dotnet aspnet-codegenerator controller -name TestController 

Add View

dotnet aspnet-codegenerator view Index Empty

上一篇:aspnet boilerplate 随笔


下一篇:发布mvc报错:403.14-Forbidden Web 服务器被配置为不列出此目录的内容