상속: CommandBase
예제 #1
0
        public ActionResult Add()
        {
            var command = new CreateNewNote();
            command.NoteId = Guid.NewGuid();

            return View(command);
        }
예제 #2
0
        public ActionResult Add(CreateNewNote command)
        {
            var service = new MyNotesCommandServiceClient();
            service.CreateNewNote(command);

            // Return user back to the index that
            // displays all the notes.));
            return RedirectToAction("Index");
        }
예제 #3
0
        public ActionResult Add(CreateNewNote command)
        {
            ChannelHelper.Use(_channelFactory.CreateChannel(), (client) =>
                                client.Execute(new ExecuteRequest(command)));

            // Return user back to the index that
            // displays all the notes.));
            return RedirectToAction("Index", "Note");
        }
 public void CreateNewNote(CreateNewNote command)
 {
     _service.Execute(command);
 }