Skip to content

Instantly share code, notes, and snippets.

@ArnisL
Created August 30, 2010 13:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ArnisL/557417 to your computer and use it in GitHub Desktop.
Save ArnisL/557417 to your computer and use it in GitHub Desktop.
[HttpPost]
public ActionResult ReceivePaperVersion(Application a,ReceivePaperVersionInput inp){
var r=new Func<ActionResult>(()=>RedirectToAction("Details",new {a.Id}));
return this.Do(
()=>{
a.ReceivePaperVersion(inp.PaperVersionSendDate.Value,inp.PaperVersionArrivalDate.Value);
this.Flash("Application paper version received!");
return r();
},r); //1st arg==happy path, 2nd arg==onFail
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment