1

full error is:

Unable to update the EntitySet 'table1' because it has a DefiningQuery and no <InsertFunction> element exists in the <ModificationFunctionMapping> element to support the current operation

From looking around, it seems this error is caused by a lack of a primary key on table1. I have checked my .edmx file and the table in SQL server and both show that a primary key is specified. What else should I be looking at?

1

1 Answer 1

1

If you are using edmx the DefiningQuery will be defined for database views and EF will treat an EntitySet created from view as read-only. If you want to be able to manipulate your data you will need to map stored procedures which will be used for CUD (Create/Update/Delete) operations.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.