Stored Procedure not updating in edmx

Mohit Sharma 5 Reputation points
2024-06-06T10:57:27.7366667+00:00

Adding or updating a stored procedure in the EDMX file is currently not functioning as expected in the latest version of Visual Studio.

Developer technologies | .NET | Other
{count} vote

4 answers

Sort by: Most helpful
  1. Mohit Sharma 5 Reputation points
    2024-06-06T12:35:09.6266667+00:00

    I just updating the edmx and add SP in it.

    0 comments No comments

  2. AgaveJoe 30,126 Reputation points
    2024-06-06T13:24:52.76+00:00

    I added a function to an EDMX file with issue.

    You did not tell us what "not functioning as expected" means or explain the steps preformed to add or update a stored procedure. The community can only guess what's wrong or what you are doing.

    I imported a new stored procedure using Visual Studio 17.10.1 with EF 6 (Database First) simply by following the official documentation.

    First, I created a new procedure in SSMS using standard T-SQL CREATE PROCEDURE. Next, I right clicked an empty space in the EDMX designer and selected "Update Model from Database". I selected the stored procedure node to get the latest procedures. Next, I right clicked an empty space in the EDMX designer and selected "Import Function". I gave the import a name then selected the procedure from the list of procedures. It just worked... I can see the procedure in the model explorer and I can execute the function in code.


  3. Stéphane Caron 0 Reputation points
    2024-11-13T18:04:04.31+00:00

    After updating to Visual Studio 2022 17.8.0 we cannot import stored procedures as we used to. The workaround is to use VS 2019 or an lode VS 2022 v17.7.6 wich works fine. I've asked this question in the developer community https://developercommunity.visualstudio.com/t/1781-EDMX-does-not-import-stored-proce/10524762#T-ND10533986 and it's been under investigation since november 2023.


  4. Selvakumar Sellapan 0 Reputation points
    2024-11-27T02:16:29.18+00:00

    Hi,

    My dev environment is asp.net mvc 5 web app and entity framework DB first approach.
    while importing stored procedure with complex type, I have faced the same issue.

    Like @Stéphane Caron suggested, we used older versions of VS 2022 to resolve this issue.

    Later by adding TrustServerCertificate=True in the connection strings in the __web.config, we resolved this issue.

    __
    https://stackoverflow.com/questions/77569893/unable-to-add-stored-procedures-to-edmx-file-in-vs-2022

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.