Mineplex2018-withcommit/Website/packages/MvcScaffolding.1.0.7/tools/Controller/MvcScaffolding.ControllerWithRepository.ps1

37 lines
1.4 KiB
PowerShell
Raw Normal View History

2013-08-27 17:14:08 +02:00
[T4Scaffolding.ControllerScaffolder("Controller with read/write action and views, using repositories", HideInConsole = $true, Description = "Adds an ASP.NET MVC controller with views and data access code", SupportsModelType = $true, SupportsDataContextType = $true, SupportsViewScaffolder = $true)][CmdletBinding()]
param(
[parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true)][string]$ControllerName,
[string]$ModelType,
[string]$Project,
[string]$CodeLanguage,
[string]$DbContextType,
[string]$Area,
[string]$ViewScaffolder = "View",
[alias("MasterPage")]$Layout,
[alias("ContentPlaceholderIDs")][string[]]$SectionNames,
[alias("PrimaryContentPlaceholderID")][string]$PrimarySectionName,
[switch]$ReferenceScriptLibraries = $false,
[switch]$NoChildItems = $false,
[string[]]$TemplateFolders,
[switch]$Force = $false,
[string]$ForceMode
)
Scaffold MvcScaffolding.Controller `
-ControllerName $ControllerName `
-ModelType $ModelType `
-Project $Project `
-CodeLanguage $CodeLanguage `
-DbContextType $DbContextType `
-Area $Area `
-ViewScaffolder $ViewScaffolder `
-Layout $Layout `
-SectionNames $SectionNames `
-PrimarySectionName $PrimarySectionName `
-ReferenceScriptLibraries:$ReferenceScriptLibraries `
-NoChildItems:$NoChildItems `
-OverrideTemplateFolders $TemplateFolders `
-Force:$Force `
-ForceMode $ForceMode `
-Repository