I am trying to execute a query using linq for entities so that the entity / table does not contain the same values ββbefore updating it.
The structure of the database is as follows:
Users User_IPAddresses IPAddresses
----- ---------------- -----------
UserID >------ UserID ------< IPAddressID
User IPAddressID Address
So, the structure of the entity object is as follows
UserSet IPAddressSet
------- >-----< ------------
User IPAddress
All identifier fields are primary keys, so the link table (User_IPAddresses) must contain unique rows.
The problem I am facing is that I cannot figure out how to inspect objects so that I do not violate the restriction of a unique row in the User_IPAddresses table before updating it.
Any EF gurus who can help me?