Updating a table with a composite primary key using LINQ
I have a table named tblUserNetwork
. It contains composite primary key
on UserID
andConnectedToUserID
When I update the table networks.Update(networks)
, it gives an error like this:
Table dbo.tblUserNetwork contains a composite primary key field
What is the problem with the update.
I update many other tables, they don't have a composite primary key that they update well and well. But this is not the case, I cannot understand this problem.
Is there an ant issue with composite primary key
source to share
General reference for handling compound keys in linq .
Could you please provide some sample code for your problem?
source to share