Webiant Logo Webiant Logo
  1. No results found.

    Try your search with a different keyword or use * as a wildcard.

BaseEntityEqualityComparer.cs

using Nop.Core;

namespace Nop.Tests;

public class BaseEntityEqualityComparer : IEqualityComparer where T : BaseEntity
{
    public bool Equals(T x, T y)
    {
        return x?.Id == y?.Id;
    }

    public int GetHashCode(T obj)
    {
        return obj.Id;
    }
}