According to the documentation of the == operator in MSDN,
==
For predefined value types, the equality operator (==) returns true if th
The .Equals() works for me while TKey is a generic type.
.Equals()
TKey
public virtual TOutputDto GetOne(TKey id) { var entity = _unitOfWork.BaseRepository .FindByCondition(x => !x.IsDelete && x.Id.Equals(id)) .SingleOrDefault(); // ... }