Stored Procedures and updating EDMX

To refresh an existing stored procedure in edmx file,

  1. Go to "Model Browser" > "Function Imports" > find the desired stored procedure class > right click and click on "Edit"
  2. In "Edit Function Import" form, in "Returns a Collection Of" section, click on "Update" button
  3. Click "OK" to finish the refresh.

enter image description here


Follow these steps:

Step 1: Open Edmx

enter image description here

Step 2: Open Model Browser

enter image description here

Step 3: Open Complex Types and remove your procedure_Result

enter image description here

Step 4: Open Functions Imports and delete your procedure

enter image description here

Step 5 Open StoredProcedur and Functions and delete your procedure

enter image description here

Step 6: Save Edmx (Ctrl+S), Clean Solution , Update Model From Database and select your procedure which you would like to get updated then finally clean, build solution. Done !


(This solution is for EF 6. I have not tried in other EF versions. It works nice.)


Go to Model browser. MyStoreProc is the name of the stored procedure (as an example). MyStoreProc will appear in 3 places.

  1. 1st place- Under Complex Types-> as MyStoreProc_result
  2. 2nd Place- Under Function Imports -> as MyStoreProc
  3. 3rd Place - Under Stored Procdures/ Functions -> as MyStoreProc

Delete all three from model. Save the edmx (by clicking in the window then ctrl+S). Then right click and click update the model from database. Then add the updated stored procedure and Save again.

Solved without any hassle :)