Developer Resources for AbleCommerce eCommerce platform
CommerceBuilder.DomainModel Namespace / BaseObjectEqualityComparer<T> Class
A type that inherits from BaseObject.
Members
In This Topic
    BaseObjectEqualityComparer<T> Class
    In This Topic

    Provides a comparer for supporting LINQ methods such as Intersect, Union and Distinct. This may be used for comparing objects of type BaseObject and anything that derives from it, such as Entity and ValueObject.

    NOTE: Microsoft decided that set operators such as Intersect, Union and Distinct should not use the IEqualityComparer's Equals() method when comparing objects, but should instead use IEqualityComparer's GetHashCode() method.

    Syntax
    public class BaseObjectEqualityComparer<T> 
    where T: BaseObject
    Type Parameters
    T
    A type that inherits from BaseObject.
    Inheritance Hierarchy

    System.Object
       CommerceBuilder.DomainModel.BaseObjectEqualityComparer<T>

    See Also