EntityKey::Equals Method (EntityKey^)
Returns a value that indicates whether this instance is equal to a specified EntityKey.
Assembly: System.Data.Entity (in System.Data.Entity.dll)
Parameters
- other
-
Type:
System.Data::EntityKey^
An EntityKey object to compare with this instance.
Return Value
Type: System::Booleantrue if this instance and other have equal values; otherwise, false.
Implements
IEquatable<T>::Equals(T)Temporary keys have different comparison semantics than permanent keys:
Temporary keys use reference equality. That is, two references to the exact same temporary EntityKey instance are equal but no other EntityKey instances are equal.
Permanent keys determine equality based on the values of the contained key properties and the EntitySet. That is, you can have two separate EntityKey instances that are equal if their entity sets are the same and their key values are equal.
In addition, temporary keys have no EntitySet or key values, but permanent keys do.
Available since 3.5