public void Handle(AddPersonToContacts addPerson) { var person = new PersonContactInfo { Id = Guid.NewGuid(), FirstName = addPerson.FirstName, LastName = addPerson.LastName, HomePhone = addPerson.HomePhone, WorkPhone = addPerson.WorkPhone, MobilePhone = addPerson.MobilePhone, Email = addPerson.EmailAddress }; this.people.Add(person); }
public IEnumerable<IResult> AddPersonContact() { CommandResult add = new AddPersonToContacts { FirstName = this.FirstName, LastName = this.LastName, HomePhone = this.HomePhone, WorkPhone = this.WorkPhone, MobilePhone = this.MobilePhone, EmailAddress = this.EmailAddress }.AsResult(); wasSaved = true; yield return add; this.ClosePerson(); yield return Show.Child<SearchScreenViewModel>().In<ShellViewModel>(); }