Friday, February 3, 2012

dive into a wormhole

This is how you would call our Command Processor from a controller action and dive into a wormhole:

[HttpPost]

public ActionResult Edit(OrderInputModel inputModel)

{

   return CommandProcessor.EditOrder(inputModel, Actions

      .OnSuccess(() => RedirectToAction("Index"))

      .OnFailure(() => View("Edit", BuildSelectListsForModel(inputModel))));

}

No comments:

Post a Comment