/// <summary>
        /// Returns true if Ticket instances are equal
        /// </summary>
        /// <param name="other">Instance of Ticket to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(Ticket other)
        {
            if (ReferenceEquals(null, other))
                return false;
            if (ReferenceEquals(this, other))
                return true;

            return
                (
                    TicketID == other.TicketID ||
                    TicketID != null &&
                    TicketID.Equals(other.TicketID)
                ) &&
                (
                    TicketEventDateID == other.TicketEventDateID ||
                    TicketEventDateID != null &&
                    TicketEventDateID.Equals(other.TicketEventDateID)
                );
        }
Пример #2
0
        /// <summary>
        /// Returns true if Ticket instances are equal
        /// </summary>
        /// <param name="other">Instance of Ticket to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(FullTicket other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     TicketID == other.TicketID ||
                     TicketID != null &&
                     TicketID.Equals(other.TicketID)
                     ) &&
                 (
                     EventDate == other.EventDate ||
                     EventDate != null &&
                     EventDate.Equals(other.EventDate)
                 ));
        }