예제 #1
0
파일: Client.cs 프로젝트: FoundOPS/server
        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;
        }
예제 #2
0
파일: Client.cs 프로젝트: FoundOPS/server
        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;
        }