C# 如何将名称空间添加到T4脚手架?

C# 如何将名称空间添加到T4脚手架?,c#,asp.net-mvc,t4scaffolding,C#,Asp.net Mvc,T4scaffolding,在Package Manager控制台中运行Get Scaffolder时,我得到以下输出: Name Description Package ----

在Package Manager控制台中运行Get Scaffolder时,我得到以下输出:

Name                                Description                                                                                                                       Package                       
----                                -----------                                                                                                                       -------                       
MvcScaffolding.Action               Creates an action method, view model, and view                                                                                    MvcScaffolding.VS2015 1.0.12  
MvcScaffolding.ActionUnitTest       Creates a unit test stub for an action method                                                                                     MvcScaffolding.VS2015 1.0.12  
MvcScaffolding.ActionWithUnitTest   Creates an action method, view model, view, and unit test stub                                                                    MvcScaffolding.VS2015 1.0.12  
MvcScaffolding.AspxView             Adds an ASP.NET MVC view using the ASPX view engine                                                                               MvcScaffolding.VS2015 1.0.12  
MvcScaffolding.Controller           Adds an ASP.NET MVC controller with views and data access code                                                                    MvcScaffolding.VS2015 1.0.12  
MvcScaffolding.RazorView            Adds an ASP.NET MVC view using the Razor view engine                                                                              MvcScaffolding.VS2015 1.0.12  
MvcScaffolding.Views                Adds ASP.NET MVC views for Create/Read/Update/Delete/Index scenarios                                                              MvcScaffolding.VS2015 1.0.12  
T4Scaffolding.CustomScaffolder      Creates an entirely new scaffolder with a PS1 script and a T4 template                                                            T4Scaffolding.Core.VS2015 1...
T4Scaffolding.CustomTemplate        Allows you to modify the T4 template rendered by a scaffolder                                                                     T4Scaffolding.Core.VS2015 1...
T4Scaffolding.EFDbContext           Makes an EF DbContext able to persist models of a given type, creating the DbContext first if necessary                           T4Scaffolding.VS2015 1.0.8    
T4Scaffolding.EFRepository          Creates a repository                                                                                                              T4Scaffolding.VS2015 1.0.8    
BasicModel                          Starts with the existing Data Model and Scaffolds everything needed to get the Entity working                                                                   
Controller                          Adds a Controller and ApiController based on the templates                                                                                                
ControllerUnitTest                  Creates a default unit test for a controller. The controller must exist prior to running this scaffolder                                                        
EmptyModel                          Scaffold an empty Model                                                                                                                                         
Module                              Creates default module controller, service, model, view model and views                                                                                         
RegisterService                     Register the Service to the Service Interface in the MainContainer class                                                                                        
Service                             Adds a Service and Service Interface based on the templates     

最后几个架子工,即:基本模型、控制器等。。。是我自己定制的脚手架工。如何使它们显示为Custom.BasicModel、Custom.Controller等?

这实际上很简单!它不是典型意义上的名称空间。这只是文件名。因此,MvcScaffolding“名称空间”中的支架都有文件名,如“MvcScaffolding.Views”

通过将我的PS1文件的名称更改为“Project.COntroller”,我能够向我的架子工添加一个“名称空间”