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

11 lines
486 B
Plaintext

<#@ Template Language="C#" HostSpecific="True" Inherits="DynamicTransform" #>
<# var viewModel = (EnvDTE.CodeType)Model.ViewModel; #>
[HttpPost, ActionName("<#= Model.Action #>")]
public ActionResult <#= Model.Action #>Post(<# if (viewModel != null) { #><#= viewModel.Name #> <#= viewModel.Name.ToLower() #><# } #>)
{
if (ModelState.IsValid) {
return RedirectToAction("Index");
} else {
return View(<# if (viewModel != null) { #><#= viewModel.Name.ToLower() #><# } #>);
}
}