Unable to update the EntitySet because it has a DefiningQuery and no element exists in the element to support the current operation.

I was getting this strange error when I tried update/insert/delete on a new table which I had added to the project.

Unable to update the EntitySet because it has a DefiningQuery and no <Insert Function> element exists in the <ModificationFunctionMapping> element to support the current operation.

Solution ?

Make sure that your table has a primary key ! If not add the key and update the Entity Framework model.

Yes that is it !