public ActionResult Create(CreateMessageCommandModel message) { try { // TODO: Add insert logic here var command = new SayHallo { Guid = Guid.NewGuid(), What = "Say: " + message.Say }; MvcApplication.Bus.Send(command); return(RedirectToAction("Created")); } catch (Exception e) { return(View()); } }
public ActionResult Create(CreateMessageCommandModel message) { try { // TODO: Add insert logic here var command = new SayHallo { Guid = Guid.NewGuid(), What = "Say: " + message.Say }; MvcApplication.Bus.Send(command); return RedirectToAction("Created"); } catch (Exception e) { return View(); } }