NEWS
Showing posts with label Entity Framework. Show all posts
Showing posts with label Entity Framework. Show all posts

Thursday, March 8, 2012

Unable to update the EntitySet ... because it has a DefiningQuery and no element exists


This is the case for me. Simply removing resulted in another error.  I followed the steps of this post except the last one. For your convenience, I copied the 4 steps from the post   that I followed to solve the problem as following:

Right click on the edmx file, select Open with, XML editor
Locate the entity in the edmx:StorageModels element
Remove the DefiningQuery entirely
Rename the store:Schema="dbo" to Schema="dbo" (otherwise, the code will generate an error saying the name is invalid)

http://social.msdn.microsoft.com/Forums/en/adodotnetentityframework/thread/220262bd-85d4-4f29-96a8-4a7d1d2c8293