コード例 #1
0
        public void Handle(ConferenceEditModel form)
        {
            Conference conf = _repository.GetById(form.Id);

            conf.ChangeName(form.Name);

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

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