Unable to update Insert the EntitySet in .net

57
Views
1
Answers

Hi, I am getting this error when Inserting or Updating the EntitySet in .net 4.0.
Unable to update the EntitySet 'MyEntity' because it has a DefiningQuery and no element exists in the element to support the current operation
How to Solve this Error?

edit | flag
William Patrick
Asked on: Jun 20, 2011 at 3:50AM

1 Answers

34
6
34

It Seems that the table you are trying to update doesn’t have a single primary key in the database. This causes the Entity Framework to create a compound key of all the non-nullable columns.

To solve the issue, just create a primary key on the table and update your Entity model.

Cheers!!

edit | flag
Gokul A
Answered on: Jun 20, 2011 at 3:53AM

Post your Answer

Search

Welcome to Ask Amoeba!
This is 100% free and interactive site for sharing professional Questions and Answers, Opensource projects, Interview questions.
Learners, beginners, Experts stop and share your knowledge and ideas!

Browse Categories

Browse Tags