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

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

In this quick post you are going learn the way to overcome the titled error.

HOW TO FIX

1st Way

Simple solution to this error is to create database tables with primary keys.

2nd Way

Another way is to open the .edmx file in XML Editor and replace the <EntityContainer….> root by following code (also delete the SQL queries) , remember to modify this code using your own Name collections.

<EntityContainer Name="MoviesAppStoreContainer">

<EntitySet Name="Movies" EntityType="MoviesApp.Store.Movies" store:Type="Tables" Schema="dbo" />

</EntityContainer>

image001.jpg

These steps will fix your issue. Thanks.

Ebook Download
View all
Learn
View all