tags:

views:

253

answers:

1

Any ideas why does the entity framework in LINQ gives following strange error: "Unable to update the EntitySet 'ItemRankList' because it has a DefiningQuery and no element exists in the element to support the current operation."

A: 

Guess i should also ask the context... how are you using linq?

Do you have a primary key defined on the table ?

If not add the key and update the EF model.

Nix
Good.. Thanks for the replay! I fixed this issue!!!Problem is that the composite Primary key is not set in the DB table where as the key are defined in the entity relations which causing this error.As Nix stated, fixed by 2 steps..> Creating the Composite P-Key > Updating the entity with new DB schema
sandeept