예제 #1
0
        public ActionResult Edit(ChangeNoteText command)
        {
            ChannelHelper.Use(NoteController.channelFactory.CreateChannel(), (client) => client.Execute(new ExecuteRequest(command)));

            // Return user back to the index that
            // displays all the notes.));
            return RedirectToAction("Index", "Note");
        }
예제 #2
0
        public ActionResult Edit(Guid id)
        {
            Note note;

            using (var context = new ReadModelContext())
            {
                note = context.Notes.Single(n => n.Id == id);
            }

            var command = new ChangeNoteText();
            command.Id = id;
            command.Text = note.Text;

            return View(command);
        }