public AddressDomain Save(AddressDomain address) { var entity = AddressEntity.FromDomain(address); var command = new AddressSaveCommand(_dataSource, entity); entity = command.Execute(); return(entity.ToDomain()); }
public BillingInfoDomain ToDomain(AddressDomain address) { return(new BillingInfoDomain( new SimpleObjectIdentifier(Id ?? throw new DataException("BillingInfo Id is null")), CompanyName, ZipCode, address )); }
public static AddressEntity FromDomain(AddressDomain domain) { return(new AddressEntity( domain.Id.Value, domain.Country, domain.City, domain.Street, domain.State, domain.BuildingNumber, domain.FlatNumber )); }
public AddressDomain Delete(AddressDomain address) { Delete(address.Id); return(address); }