public static Allowance ToAllowance(AllowanceContract contract) { return (contract != null ? new Allowance(contract.Title, contract.Amount) : null); }
public static AllowanceContract ToAllowanceContract(Allowance allowance) { AllowanceContract contract = null; if (allowance != null) { contract = new AllowanceContract(); contract.Amount = allowance.Amount; contract.Title = allowance.Title; } return contract; }