Mineplex2018-withcommit/Website/packages/MvcScaffolding.1.0.7/tools/Action/ActionPost.vb.t4
Jonathan Williams 3fb52c5c71 Initial Commit
2013-08-27 08:14:08 -07:00

11 lines
547 B
Plaintext

<#@ 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