public ContactDetails GetContactById(int id) { ContactDatabase contactDatabase = new ContactDatabase(); var contact = contactDatabase.GetContactById(id); var contactInfo = new ContactDetails { Id = contact.Id, FirstName = contact.FirstName, LastName = contact.LastName, Email = contact.Email, PhoneNumber = contact.PhoneNumber }; return(contactInfo); }