Exemple #1
0
        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;
        }
Exemple #2
0
        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;
        }