public ActionResult Edit(string eventName)
        {
            var conf = _repository.GetByName(eventName);

            var model = new ConferenceEditModel
            {
                Id = conf.Id,
                Name = conf.Name,
                Attendees = conf.GetAttendees()
                    .Select(a => new ConferenceEditModel.AttendeeEditModel
                    {
                        Id = a.Id,
                        FirstName = a.FirstName,
                        LastName = a.LastName,
                        Email = a.Email,
                    }).ToArray()
            };

            return View(model);
        }
        public ActionResult Edit(ConferenceEditModel form)
        {
            if (!ModelState.IsValid)
            {
                return View(form);
            }

            var conf = _repository.GetById(form.Id);

            conf.ChangeName(form.Name);

            foreach (var attendeeEditModel in form.Attendees)
            {
                var attendee = conf.GetAttendee(attendeeEditModel.Id);

                attendee.ChangeName(attendeeEditModel.FirstName, attendeeEditModel.LastName);
                attendee.Email = attendeeEditModel.Email;
            }

            return this.RedirectToAction(c => c.Index(null), "Default");
        }
        public ActionResult Edit(ConferenceEditModel form)
        {
            var success = this.RedirectToAction(c => c.Index(null), "Default");

            return Form(form, success);
        }