/// <summary> /// Конвертация в контактную информацию БД /// </summary> /// <param name="contact">Контактная информация </param> /// <returns>Контактная информация БД</returns> public static ContactInformationEnt Convert(ContactInformation contact) { if (contact != null) { var x = Unit.ContactInformationRepository.GetItem(contact.Id); if (x != null) { return(x); } else { ContactInformationEnt ent = new ContactInformationEnt { Address = contact.Address, Email = contact.Email, Id = contact.Id, Phone = contact.Phone }; return(ent); } } else { return(null); } }
/// <summary> /// Конвертация в контактную информацию /// </summary> /// <param name="contact">Контактная информация БД </param> /// <returns>Контактная информация </returns> public static ContactInformation Convert(ContactInformationEnt contact) { if (contact != null) { ContactInformation ent = new ContactInformation { Address = contact.Address, Email = contact.Email, Id = contact.Id, Phone = contact.Phone }; return(ent); } else { return(null); } }