简体   繁体   中英

Entity Framework Database first add parameter to stored procedure

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM