Example #1
0
 public EntityReceiver(
     IObjectIdentifier <ulong> id,
     BillingInfoDomain billingInfo,
     ContactInfoDomain contactInfo
     ) : base(id, billingInfo, contactInfo)
 {
 }
Example #2
0
 public static EntityReceiver Create(
     BillingInfoDomain billingInfo,
     ContactInfoDomain contactInfo
     )
 {
     return(new EntityReceiver(null, billingInfo, contactInfo));
 }
 public ReceiverDomain ToDomain(BillingInfoDomain billingInfo, ContactInfoDomain contactInfo)
 {
     return(new ReceiverDomain(
                new SimpleObjectIdentifier(Id ?? throw new DataException("ReceiverEntity Id is null")),
                billingInfo,
                contactInfo
                ));
 }
Example #4
0
        public ContactInfoDomain Save(ContactInfoDomain domain)
        {
            var entity  = ContactInfoEntity.FromDomain(domain);
            var command = new ContactInfoSaveCommand(_dataSource, entity);

            entity = command.Execute();

            return(entity.ToDomain());
        }
 public static ContactInfoEntity FromDomain(ContactInfoDomain domain)
 {
     return(new ContactInfoEntity(
                domain.Id.Value,
                domain.Email,
                domain.Phone,
                domain.Mobile,
                domain.Title,
                domain.Gender.ToString(),
                domain.Name,
                domain.Surname
                ));
 }
Example #6
0
 public ContactInfoDomain Delete(ContactInfoDomain domain)
 {
     Delete(domain.Id);
     return(domain);
 }