public virtual void Patch(MemberDataEntity target) { var patchInjection = new PatchInjection <MemberDataEntity>(x => x.Name); target.InjectFrom(patchInjection, this); if (!this.Phones.IsNullCollection()) { var phoneComparer = AnonymousComparer.Create((PhoneDataEntity x) => x.Number); this.Phones.Patch(target.Phones, phoneComparer, (sourcePhone, targetPhone) => targetPhone.Number = sourcePhone.Number); } if (!this.Emails.IsNullCollection()) { var addressComparer = AnonymousComparer.Create((EmailDataEntity x) => x.Address); this.Emails.Patch(target.Emails, addressComparer, (sourceEmail, targetEmail) => targetEmail.Address = sourceEmail.Address); } if (!this.Addresses.IsNullCollection()) { this.Addresses.Patch(target.Addresses, new AddressDataEntityComparer(), (sourceAddress, targetAddress) => sourceAddress.Patch(targetAddress)); } if (!this.Notes.IsNullCollection()) { var noteComparer = AnonymousComparer.Create((NoteDataEntity x) => x.Id ?? x.Body); this.Notes.Patch(target.Notes, noteComparer, (sourceNote, targetNote) => sourceNote.Patch(targetNote)); } if (!this.MemberRelations.IsNullCollection()) { var relationComparer = AnonymousComparer.Create((MemberRelationDataEntity x) => x.AncestorId); this.MemberRelations.Patch(target.MemberRelations, relationComparer, (sourceRel, targetRel) => { /*Nothing todo*/ }); } }
public override void Patch(MemberDataEntity target) { var patchInjection = new PatchInjection <VendorDataEntity>(x => x.SiteUrl, x => x.LogoUrl, x => x.GroupName, x => x.Description); target.InjectFrom(patchInjection, this); base.Patch(target); }
public override void Patch(MemberDataEntity target) { var patchInjection = new PatchInjection<OrganizationDataEntity>(x => x.Name, x => x.Description, x => x.OwnerId, x => x.OrgType, x => x.BusinessCategory); target.InjectFrom(patchInjection, this); base.Patch(target); }
public override void Patch(MemberDataEntity target) { var patchInjection = new PatchInjection <EmployeeDataEntity>(x => x.FirstName, x => x.MiddleName, x => x.LastName, x => x.BirthDate, x => x.DefaultLanguage, x => x.FullName, x => x.IsActive, x => x.Type, x => x.TimeZone); target.InjectFrom(patchInjection, this); base.Patch(target); }
public override void Patch(MemberDataEntity target) { var patchInjection = new PatchInjection <OrganizationDataEntity>(x => x.Name, x => x.Description, x => x.OwnerId, x => x.OrgType, x => x.BusinessCategory); target.InjectFrom(patchInjection, this); base.Patch(target); }
public override void Patch(MemberDataEntity memberEntity) { var target = memberEntity as VendorDataEntity; target.SiteUrl = this.SiteUrl; target.LogoUrl = this.LogoUrl; target.GroupName = this.GroupName; target.Description = this.Description; base.Patch(target); }
public override void Patch(MemberDataEntity memberEntity) { var target = memberEntity as OrganizationDataEntity; target.Name = this.Name; target.Description = this.Description; target.OwnerId = this.OwnerId; target.OrgType = this.OrgType; target.BusinessCategory = this.BusinessCategory; base.Patch(target); }
public override void Patch(MemberDataEntity target) { if (target is VendorDataEntity targetVendor) { targetVendor.SiteUrl = SiteUrl; targetVendor.LogoUrl = LogoUrl; targetVendor.GroupName = GroupName; targetVendor.Description = Description; } base.Patch(target); }
public override void Patch(MemberDataEntity target) { if (target is OrganizationDataEntity targetOrganization) { targetOrganization.Name = Name; targetOrganization.Description = Description; targetOrganization.OwnerId = OwnerId; targetOrganization.OrgType = OrgType; targetOrganization.BusinessCategory = BusinessCategory; } base.Patch(target); }
public override void Patch(MemberDataEntity memberEntity) { var target = memberEntity as EmployeeDataEntity; target.FirstName = this.FirstName; target.MiddleName = this.MiddleName; target.LastName = this.LastName; target.BirthDate = this.BirthDate; target.DefaultLanguage = this.DefaultLanguage; target.FullName = this.FullName; target.IsActive = this.IsActive; target.Type = this.Type; target.TimeZone = this.TimeZone; target.PhotoUrl = this.PhotoUrl; base.Patch(target); }
public override void Patch(MemberDataEntity target) { if (target is EmployeeDataEntity targetEmployee) { targetEmployee.FirstName = FirstName; targetEmployee.MiddleName = MiddleName; targetEmployee.LastName = LastName; targetEmployee.BirthDate = BirthDate; targetEmployee.DefaultLanguage = DefaultLanguage; targetEmployee.FullName = FullName; targetEmployee.IsActive = IsActive; targetEmployee.Type = Type; targetEmployee.TimeZone = TimeZone; targetEmployee.PhotoUrl = PhotoUrl; } base.Patch(target); }
public override void Patch(MemberDataEntity memberDataEntity) { var target = memberDataEntity as ContactDataEntity; target.FirstName = this.FirstName; target.MiddleName = this.MiddleName; target.LastName = this.LastName; target.BirthDate = this.BirthDate; target.DefaultLanguage = this.DefaultLanguage; target.FullName = this.FullName; target.Salutation = this.Salutation; target.TimeZone = this.TimeZone; target.TaxpayerId = this.TaxpayerId; target.PreferredCommunication = this.PreferredCommunication; target.PreferredDelivery = this.PreferredDelivery; base.Patch(target); }
public override void Patch(MemberDataEntity target) { if (target is ContactDataEntity targetContact) { targetContact.FirstName = FirstName; targetContact.MiddleName = MiddleName; targetContact.LastName = LastName; targetContact.BirthDate = BirthDate; targetContact.DefaultLanguage = DefaultLanguage; targetContact.FullName = FullName; targetContact.Salutation = Salutation; targetContact.TimeZone = TimeZone; targetContact.TaxpayerId = TaxpayerId; targetContact.PreferredCommunication = PreferredCommunication; targetContact.PreferredDelivery = PreferredDelivery; targetContact.PhotoUrl = PhotoUrl; } base.Patch(target); }
public virtual void Patch(MemberDataEntity target) { target.Name = Name; if (!Phones.IsNullCollection()) { var phoneComparer = AnonymousComparer.Create((PhoneDataEntity x) => x.Number); Phones.Patch(target.Phones, phoneComparer, (sourcePhone, targetPhone) => targetPhone.Number = sourcePhone.Number); } if (!Emails.IsNullCollection()) { var addressComparer = AnonymousComparer.Create((EmailDataEntity x) => x.Address); Emails.Patch(target.Emails, addressComparer, (sourceEmail, targetEmail) => targetEmail.Address = sourceEmail.Address); } if (!Groups.IsNullCollection()) { var groupComparer = AnonymousComparer.Create((MemberGroupDataEntity x) => x.Group); Groups.Patch(target.Groups, groupComparer, (sourceGroup, targetGroup) => targetGroup.Group = sourceGroup.Group); } if (!Addresses.IsNullCollection()) { Addresses.Patch(target.Addresses, (sourceAddress, targetAddress) => sourceAddress.Patch(targetAddress)); } if (!Notes.IsNullCollection()) { var noteComparer = AnonymousComparer.Create((NoteDataEntity x) => x.Id ?? x.Body); Notes.Patch(target.Notes, noteComparer, (sourceNote, targetNote) => sourceNote.Patch(targetNote)); } if (!MemberRelations.IsNullCollection()) { var relationComparer = AnonymousComparer.Create((MemberRelationDataEntity x) => x.AncestorId); MemberRelations.Patch(target.MemberRelations, relationComparer, (sourceRel, targetRel) => { /*Nothing todo*/ }); } }
public override void Patch(MemberDataEntity target) { var patchInjection = new PatchInjection<ContactDataEntity>(x => x.FirstName, x => x.MiddleName, x => x.LastName, x => x.BirthDate, x => x.DefaultLanguage, x => x.FullName, x => x.Salutation, x => x.TimeZone); target.InjectFrom(patchInjection, this); base.Patch(target); }
public virtual void Patch(MemberDataEntity target) { var patchInjection = new PatchInjection<MemberDataEntity>(x => x.Name); target.InjectFrom(patchInjection, this); if (!this.Phones.IsNullCollection()) { var phoneComparer = AnonymousComparer.Create((PhoneDataEntity x) => x.Number); this.Phones.Patch(target.Phones, phoneComparer, (sourcePhone, targetPhone) => targetPhone.Number = sourcePhone.Number); } if (!this.Emails.IsNullCollection()) { var addressComparer = AnonymousComparer.Create((EmailDataEntity x) => x.Address); this.Emails.Patch(target.Emails, addressComparer, (sourceEmail, targetEmail) => targetEmail.Address = sourceEmail.Address); } if (!this.Addresses.IsNullCollection()) { this.Addresses.Patch(target.Addresses, new AddressDataEntityComparer(), (sourceAddress, targetAddress) => sourceAddress.Patch(targetAddress)); } if (!this.Notes.IsNullCollection()) { var noteComparer = AnonymousComparer.Create((NoteDataEntity x) => x.Id ?? x.Body); this.Notes.Patch(target.Notes, noteComparer, (sourceNote, targetNote) => sourceNote.Patch(targetNote)); } if (!this.MemberRelations.IsNullCollection()) { var relationComparer = AnonymousComparer.Create((MemberRelationDataEntity x) => x.AncestorId); this.MemberRelations.Patch(target.MemberRelations, relationComparer, (sourceRel, targetRel) => { /*Nothing todo*/ }); } }