public bool Equals(InventoryItem other) { if (other == null || other.PartNumber == null) { return(false); } return(PartNumber.Equals(other.PartNumber)); }
public bool Equals(OrderDetail other) => other is null ? false : (PartNumber.Equals(other.PartNumber) && Number.Equals(other.Number));
/// <summary> /// Returns true if Item instances are equal /// </summary> /// <param name="other">Instance of Item to be compared</param> /// <returns>Boolean</returns> public bool Equals(Item other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Upc == other.Upc || Upc != null && Upc.Equals(other.Upc) ) && ( Ean == other.Ean || Ean != null && Ean.Equals(other.Ean) ) && ( Isbn == other.Isbn || Isbn != null && Isbn.Equals(other.Isbn) ) && ( Asin == other.Asin || Asin != null && Asin.Equals(other.Asin) ) && ( Title == other.Title || Title != null && Title.Equals(other.Title) ) && ( Sku == other.Sku || Sku != null && Sku.Equals(other.Sku) ) && ( Mpn == other.Mpn || Mpn != null && Mpn.Equals(other.Mpn) ) && ( PartNumber == other.PartNumber || PartNumber != null && PartNumber.Equals(other.PartNumber) ) && ( Upcs == other.Upcs || Upcs != null && other.Upcs != null && Upcs.SequenceEqual(other.Upcs) ) && ( Description == other.Description || Description != null && Description.Equals(other.Description) ) && ( Brand == other.Brand || Brand != null && Brand.Equals(other.Brand) ) && ( Manufacturer == other.Manufacturer || Manufacturer != null && Manufacturer.Equals(other.Manufacturer) ) && ( Color == other.Color || Color != null && Color.Equals(other.Color) ) && ( NewPrice == other.NewPrice || NewPrice.Equals(other.NewPrice) ) && ( UsedPrice == other.UsedPrice || UsedPrice.Equals(other.UsedPrice) ) && ( CurrencyCode == other.CurrencyCode || CurrencyCode != null && CurrencyCode.Equals(other.CurrencyCode) ) && ( Url == other.Url || Url != null && Url.Equals(other.Url) ) && ( Features == other.Features || Features != null && other.Features != null && Features.SequenceEqual(other.Features) ) && ( Dimensions == other.Dimensions || Dimensions != null && other.Dimensions != null && Dimensions.SequenceEqual(other.Dimensions) ) && ( Images == other.Images || Images != null && other.Images != null && Images.SequenceEqual(other.Images) ) && ( MatchedItems == other.MatchedItems || MatchedItems != null && other.MatchedItems != null && MatchedItems.SequenceEqual(other.MatchedItems) ) && ( IsoCountryCodes == other.IsoCountryCodes || IsoCountryCodes != null && other.IsoCountryCodes != null && IsoCountryCodes.SequenceEqual(other.IsoCountryCodes) ) && ( CompanyName == other.CompanyName || CompanyName != null && CompanyName.Equals(other.CompanyName) ) && ( CompanyAddress == other.CompanyAddress || CompanyAddress != null && CompanyAddress.Equals(other.CompanyAddress) ) && ( Categories == other.Categories || Categories != null && other.Categories != null && Categories.SequenceEqual(other.Categories) ) && ( CategoryHierarchies == other.CategoryHierarchies || CategoryHierarchies != null && other.CategoryHierarchies != null && CategoryHierarchies.SequenceEqual(other.CategoryHierarchies) )); }