I'm attempting to use EntityFramework to access a Store Procedure.
I took the following actions:
In the Azure Database, I first generated the stored procedure as follows:
Then, after simply choosing the StoredProcedure I wanted, I updated the.edmx model from the database.
Once completed, the StoredProcedure is added to the Function Import but not to the section of StoredProcedures. What can I do to make sure it shows up here?
All of the arguments are indicated as input in the Function Import section, however "MaxReference" should be listed as output. How do I alter it?
Despite these two problems, I ran the code:
and I received the subsequent exception:
EntityCommandCompilationException An error occurred while preparing command definition. See the inner exception for details.
the InnerException, and
The function import 'DataModelEntities.AssignMaxSalesRef' cannot be executed because it is not assigned to a storage function.
Although I should have enough reputation to remark on this post, I don't.
I experienced a similar problem. I could see my stored procedures, but I was still getting the problem. Alex asked me a question, and in response I looked in the Model Browser's Function Imports section, where I saw that I had numerous entries for each of the stored methods. To avoid being real copies, they had sequence numbers. I updated the model from the database, deleted everything under Function Imports and Stored Procedures / Functions, and then added everything back. My problem has been fixed.