Unable to update the EntitySet-because it has a DefiningQuery and no element exists to support the current operation
Today I was struggling to solve this strange error in entity framework 5 while saving a new record in a table.
The error was : "Unable to update the EntitySet - because it has a DefiningQuery and no <UpdateFunction> element exist to support the current operation."
I googled alot and found this was happening because I did not add a primary key in my table in which I was trying to insert/update recods.
I added primary key in my table and then it worked liked nothing happned earlier... :)
[Note] : to add a primary key on existing table you may reffer to : http://www.dotnetlogix.com/KB/Article/57/How-to-create-primary-key-on-a-table
Hope this will help someone....