Mineplex2018-withcommit/Website/packages/MvcScaffolding.1.0.7/tools/Action/ActionPost.vb.t4

11 lines
547 B
Plaintext
Raw Normal View History

2013-08-27 17:14:08 +02:00
<#@ Template Language="VB" HostSpecific="True" Inherits="DynamicTransform" #>
<# Dim viewModel = CType(Model.ViewModel, EnvDTE.CodeType) #>
<HttpPost, ActionName("<#= Model.Action #>")>
Public Function <#= Model.Action #>Post(<# If viewModel IsNot Nothing Then #>ByVal <#= viewModel.Name.ToLower() #> As <#= viewModel.Name #><# End If #>) As ActionResult
If ModelState.IsValid Then
Return RedirectToAction("Index")
Else
Return View(<# If viewModel IsNot Nothing Then #><#= viewModel.Name.ToLower() #><# End If #>)
End If
End Function