Пример #1
0
        /// <summary>
        /// Returns true if EventDate instances are equal
        /// </summary>
        /// <param name="other">Instance of EventDate to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(EventDate other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     TicketEventDateID == other.TicketEventDateID ||
                     TicketEventDateID != null &&
                     TicketEventDateID.Equals(other.TicketEventDateID)
                     ) &&
                 (
                     TicketEventID == other.TicketEventID ||
                     TicketEventID != null &&
                     TicketEventID.Equals(other.TicketEventID)
                 ) &&
                 (
                     VenueID == other.VenueID ||
                     VenueID != null &&
                     VenueID.Equals(other.VenueID)
                 ) &&
                 (
                     EventStartDateTime == other.EventStartDateTime ||
                     EventStartDateTime != null &&
                     EventStartDateTime.Equals(other.EventStartDateTime)
                 ) &&
                 (
                     MaxTickets == other.MaxTickets ||
                     MaxTickets != null &&
                     MaxTickets.Equals(other.MaxTickets)
                 ) &&
                 (
                     Price == other.Price ||
                     Price != null &&
                     Price.Equals(other.Price)
                 ));
        }
        /// <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)
                );
        }
Пример #3
0
        /// <summary>
        /// Returns true if EventDate instances are equal
        /// </summary>
        /// <param name="other">Instance of EventDate to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(FullEventDate other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     TicketEventDateID == other.TicketEventDateID ||
                     TicketEventDateID != null &&
                     TicketEventDateID.Equals(other.TicketEventDateID)
                     ) &&
                 (
                     TicketEventID == other.TicketEventID ||
                     TicketEventID != null &&
                     TicketEventID.Equals(other.TicketEventID)
                 ) &&
                 (
                     EventName == other.EventName ||
                     EventName != null &&
                     EventName.Equals(other.EventName)
                 ) &&
                 (
                     EventHtmlDescription == other.EventHtmlDescription ||
                     EventHtmlDescription != null &&
                     EventHtmlDescription.Equals(other.EventHtmlDescription)
                 ) &&
                 (
                     EventImagePath == other.EventImagePath ||
                     EventImagePath != null &&
                     EventImagePath.Equals(other.EventImagePath)
                 ) &&
                 (
                     VenueID == other.VenueID ||
                     VenueID != null &&
                     VenueID.Equals(other.VenueID)
                 ) &&
                 (
                     VenueName == other.VenueName ||
                     VenueName != null &&
                     VenueName.Equals(other.VenueName)
                 ) &&
                 (
                     Address == other.Address ||
                     Address != null &&
                     Address.Equals(other.Address)
                 ) &&
                 (
                     City == other.City ||
                     City != null &&
                     City.Equals(other.City)
                 ) &&
                 (
                     Country == other.Country ||
                     Country != null &&
                     Country.Equals(other.Country)
                 ) &&
                 (
                     EventStartDateTime == other.EventStartDateTime ||
                     EventStartDateTime != null &&
                     EventStartDateTime.Equals(other.EventStartDateTime)
                 ) &&
                 (
                     MaxTickets == other.MaxTickets ||
                     MaxTickets != null &&
                     MaxTickets.Equals(other.MaxTickets)
                 ) &&
                 (
                     Price == other.Price ||
                     Price != null &&
                     Price.Equals(other.Price)
                 ));
        }