1

I am using Entity Framework 5.

I have a stored procedure that was added to the model some time ago. Now i have add a new parameter. I tried using "Update Model From Database..." but it doesn't add the new paramerter to the c# generated code.

In the edit menu of the stored procedure from the model browser tab all i could find was to update the columns that the stored procedure returns.

Is there any way of refreshing the parameters that the stored procedure expects without removing the stored procedure from the model and then adding it again?

Liviu Boboia
  • 1,734
  • 1
  • 10
  • 21
  • did you check this link: http://stackoverflow.com/questions/8332013/how-to-pass-parameters-to-stored-procedure-from-entity-framework – Hamed Javaheri Aug 10 '16 at 07:46
  • yes, "Update Model From Database..." doesn't add the new parameter, it works only if you add a new stored procedure, that was my question, if you can refresh without removing and adding the stored procedure again – Liviu Boboia Aug 10 '16 at 07:50

1 Answers1

0

The solution is following:

1) In your .edmx, right-click and select Model Browser.

2)Find Function Imports, expand it and double-click your stored procedure.

3)Click the Update button.

4)Click ok and save your .edmx to reflect changes in your project.

Mihai Alexandru-Ionut
  • 47,092
  • 13
  • 101
  • 128