c# - linq : update/delete junction table have two Primary Key -
public void update (rate a) { = (from ee in datacontext.rates ee.users_id == a.users_id && ee.books_id == a.books_id select ee).singleordefault(); datacontext.submitchanges(); } error:
violation of primary key constraint 'pk_rates'. cannot insert duplicate key in object 'dbo.rates'. duplicate key value (3, 1).
Comments
Post a Comment