Key. Inequality(EntityKey, EntityKey) Operator
Compares two EntityKey objects.
public: static bool operator !=(System::Data::EntityKey ^ key1, System::Data::EntityKey ^ key2);
public static bool operator != (System.Data.EntityKey key1, System.Data.EntityKey key2);
static member op_Inequality : System.Data.EntityKey * System.Data.EntityKey -> bool
Public Shared Operator != (key1 As EntityKey, key2 As EntityKey) As Boolean
true if the
key2 values are not equal; otherwise,
Temporary keys have different comparison semantics than permanent keys:
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 regular keys do.