Ejemplo n.º 1
0
        public override int GetHashCode()
        {
            unchecked
            {
                var hashCode = (Id != null ? Id.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ IssueDate.GetHashCode();
                hashCode = (hashCode * 397) ^ DueDate.GetHashCode();
                hashCode = (hashCode * 397) ^ RedemptionDate.GetHashCode();
                hashCode = (hashCode * 397) ^ (Items != null ? Items.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (Payments != null ? Payments.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (Supplier != null ? Supplier.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (Receiver != null ? Receiver.GetHashCode() : 0);

                return(hashCode);
            }
        }
 public bool Equals(InvoiceDto other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     // TODO ArBy redemptionDate equality
     return(Equals(Id, other.Id) &&
            IssueDate.Equals(other.IssueDate) &&
            DueDate.Equals(other.DueDate) &&
            RedemptionDate.Equals(other.RedemptionDate) &&
            Equals(Items, other.Items) &&
            Equals(Payments, other.Payments) &&
            Equals(Supplier, other.Supplier) &&
            Equals(Receiver, other.Receiver));
 }