public static Core.Models.CoreEntities.Client ConvertBack(Client clientModel) { var client = new Core.Models.CoreEntities.Client { Id = clientModel.Id, Name = clientModel.Name }; foreach (var contactInfo in clientModel.ContactInfoSet) client.ContactInfoSet.Add(ContactInfo.ConvertBack(contactInfo)); return client; }
public static Client ConvertModel(FoundOps.Core.Models.CoreEntities.Client clientModel) { var client = new Client { Id = clientModel.Id, CreatedDate = clientModel.CreatedDate, Name = clientModel.Name }; client.SetLastModified(clientModel.LastModified, clientModel.LastModifyingUserId); foreach (var contactInfo in clientModel.ContactInfoSet) client.ContactInfoSet.Add(ContactInfo.Convert(contactInfo)); return client; }