【.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

posted @ 2020-01-22 22:41  BrainK_1400  阅读(306)  评论(0编辑  收藏  举报