you have to implement iComparable Interface in your EntityClass class.
and you have to implement the
equals
method inside your class, you have to write your own logic to check the equality of two objects.
follow the link to learn more..
http://support.microsoft.com/kb/320727[
^]
mark as answer if solves your problem, it motivates :)