Where can I find documentation on MvcScaffold package listed on nuPack?
-
28-09-2019 - |
문제
I'm trying to find documentation on how to use the MvcScaffold package on nuPack, but I can't find anything anywhere.
I know I have basic intellisense support in the Package Management Console, but I want to do something a little more complicated than your typical scaffolding.
I was hoping there would be some documentation somewhere.
Does anyone know where there is documentation on this package?
해결책
I can't seem to find the reference to the actual project either. Though Scott Hanselman has an example in his blog post on NuPack. The scaffolding is invoked through a simple power shell script, so you can always refer to that.
There are three commands available:
> Get-MvcViewTemplates (gets a list of available T4 templates)
> Add-MvcView TemplateName (creates a view based on a T4 template:
I.E. List, Details, Edit,
Create or Delete)
> Scaffold-MvcViews -ModelType MyModel (creates views for the model)
The example above uses only the mandatory parameters, but you can use any of the additional parameters:
> Add-MvcView Edit -ModelType Product -OutputFileExtension .ascx
다른 팁
Steve Sanderson just posted some howtos on his blog about this topic - they're worth reading: http://blog.stevensanderson.com/category/scaffolding/
There's not doc for that package just yet, it's still a prototype you can download the package and look at the source to see all of the options.