コード例 #1
0
        public AddressDomain Save(AddressDomain address)
        {
            var entity  = AddressEntity.FromDomain(address);
            var command = new AddressSaveCommand(_dataSource, entity);

            entity = command.Execute();

            return(entity.ToDomain());
        }
コード例 #2
0
 public BillingInfoDomain ToDomain(AddressDomain address)
 {
     return(new BillingInfoDomain(
                new SimpleObjectIdentifier(Id ?? throw new DataException("BillingInfo Id is null")),
                CompanyName,
                ZipCode,
                address
                ));
 }
コード例 #3
0
 public static AddressEntity FromDomain(AddressDomain domain)
 {
     return(new AddressEntity(
                domain.Id.Value,
                domain.Country,
                domain.City,
                domain.Street,
                domain.State,
                domain.BuildingNumber,
                domain.FlatNumber
                ));
 }
コード例 #4
0
 public AddressDomain Delete(AddressDomain address)
 {
     Delete(address.Id);
     return(address);
 }