The function import cannot be executed because it is not mapped to a store function
This is very typical error
you receive when your underlying database store is changed and there is no
update made to EDMX file.
For example, I imported a
stored procedure in edmx and saved it. After that I change the stored procedure
and do not update edmx. I run the application and at runtime the error is encountered
as - “the function import cannot be executed because it is not mapped to a
store function”.
This error can be resolved
easily by updating the edmx. Following is procedure to resolve the error –
Open the edmx and open
Model Browser. Model browser can be opened as shown below.
Find the required stored
procedure in model browser. The right click and select option – “Delete from
Model” as shown below –
Now again open the model
browser and find the added stored procedure. Right click on it and select the “Edit”
option as shown below -
“Edit function Import” pop
up will appear. For the selected stored procedure you will find that, return
collection is having the two options which end with “Results1” and “Results”. Out of these two options select Results option and click OK.
This will resolve the
error. Hope it helps.
Cheers…
Happy Importing!!!
Comments
Post a Comment