none
Why doesn't EF recognize the change in my SP? RRS feed

  • Question

  • We've got an Entity Framework 6.1.3 .edmx file in our Visual Studio 2015 application. We're working with SQL Server 2012. I've made an update to a stored procedure by adding a new column that's to be returned, saved it. I have opened the .edmx file 4 times to do a refresh on its model refreshing that stored procedure.

    EF refuses to see the change. Why is that???


    Rod

    Wednesday, August 10, 2016 5:24 PM

Answers

  • Hi Rod at Work,

    Based on your description, I create a demo and reproduce your issue on my side, it seems that you we couldn't use update from model to refresh the stored procedure. but we could use Model Browser to achieve your requirement.

    1.  open the "Model Browser" window while you have the .edmx open (right click edmx->select Model Browser).

    • 2. Expand the related Model, , and then Function Imports nodes. Look for the function import for your stored procedure and double click it. The same window you used to create it will open, but now populated with its data.

    • 3. Click the Update button

    • 4. Click OK.

    Best regards,

    Cole Wu


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by Rod at Work Thursday, August 11, 2016 5:04 PM
    Thursday, August 11, 2016 4:35 AM
    Moderator

All replies

  • Hi Rod at Work,

    Based on your description, I create a demo and reproduce your issue on my side, it seems that you we couldn't use update from model to refresh the stored procedure. but we could use Model Browser to achieve your requirement.

    1.  open the "Model Browser" window while you have the .edmx open (right click edmx->select Model Browser).

    • 2. Expand the related Model, , and then Function Imports nodes. Look for the function import for your stored procedure and double click it. The same window you used to create it will open, but now populated with its data.

    • 3. Click the Update button

    • 4. Click OK.

    Best regards,

    Cole Wu


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by Rod at Work Thursday, August 11, 2016 5:04 PM
    Thursday, August 11, 2016 4:35 AM
    Moderator
  • That is slick, Cole. Thanks.

    Rod

    Thursday, August 11, 2016 5:04 PM