public ActionResult EditCommand(Guid id, SpeakerEditModel model)
 {
     if (ModelState.IsValid) {
         speakerService.UpdateSpeaker(id, model);
         return RedirectToAction("Details", new {id});
     }
     return View(model);
 }
 public static IHtmlString EditSpeaker(this HtmlHelper htmlHelper, string caption, SpeakerEditModel speaker)
 {
     return htmlHelper.ActionLink(caption, "Edit", "Speaker", new {
         id = speaker.Id
     }, null);
 }
 public void UpdateSpeaker(Guid speakerId, SpeakerEditModel model)
 {
     var speaker = GetSpeaker(speakerId);
     model.MapTo(speaker);
     repository.SaveChanges();
 }