Exemplo n.º 1
0
        /// <summary>
        /// Returns true if ProductSubCategory instances are equal
        /// </summary>
        /// <param name="other">Instance of ProductSubCategory to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ProductSubCategory other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     ProductSubCategoryID == other.ProductSubCategoryID ||
                     ProductSubCategoryID != null &&
                     ProductSubCategoryID.Equals(other.ProductSubCategoryID)
                     ) &&
                 (
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                 ) &&
                 (
                     ProductCategoryID == other.ProductCategoryID ||
                     ProductCategoryID != null &&
                     ProductCategoryID.Equals(other.ProductCategoryID)
                 ));
        }