I am trying to access a Store Procedure from EntityFramework.
I have followed these steps:
First of all I have created the Stored Procedure in the Azure Database:
Then, I have updated the .edmx model from database, selecting only the StoredProcedure I want.
Once done, in the Function Import I see the StoredProcedure added, but not in the section of StoredProcedures. What can I do so that it appears here?
In the Function Import section, all the parameters are set as Input, whereas "MaxReference" should be marked as Output. How can I change it?
Although these two issues I have executed the code:
and I got the following exception:
EntityCommandCompilationException
An error occurred while preparing command definition. See the inner exception for details.
and the InnerException:
The function import 'DataModelEntities.AssignMaxSalesRef' cannot be executed because it is not assigned to a storage function.