Пример #1
0
        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());
            }
        }
Пример #2
0
        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();
            }
        }