I came across this problem on an updatable view. Found this article solved my problem.
So the underlying table of my view does have primary key defined but EF does not know which columns are in the PK as the entity was built on the view. The trick here is to 'convince' EF that your view can be updated as a table.
Steps are almost the same as mentioned by above answers:
- Right click on the edmx file, select Open with, XML editor
- Locate the entity in the edmx:StorageModels element
- Remove the
section entirely
- Rename the store:Schema="dbo" to Schema="dbo"
- Change
store:Type="Views" to store:Type="Tables"