protected crm.Contact Get_or_create_crm_contact(int of_contact_id) { of.data.Contact of_contact = _of_connection.Contact.Get(of_contact_id); crm.Contact contact = new crm.Contact(_service, _tracingService); contact.Get_contact(_service, of_contact.Of_id, of_contact.Of_id.Value, of_contact.Email); if (contact.CrmEntity == null) { Mapping.Contact.To_crm(contact, of_contact, _tracingService); contact.Create(); } return(contact); }