title: Error calling Stored Procedures from EntityFramework
body: <p>I am trying to access a Store Procedure from EntityFramework.</p>
  
  <p>I have followed these steps:</p>
  
  <p>First of all I have created the Stored Procedure in the Azure Database:</p>
  
  <p><img src="https://i.stack.imgur.com/Jmlmv.png" alt="enter image description here"></p>
  
  <p>Then, I have updated the .edmx model from database, selecting only the StoredProcedure I want.</p>
  
  <p><img src="https://i.stack.imgur.com/26ArB.png" alt="enter image description here"></p>
  
  <p>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?</p>
  
  <p><img src="https://i.stack.imgur.com/ViG6Z.png" alt="enter image description here"></p>
  
  <p>In the Function Import section, all the parameters are set as Input, whereas "MaxReference" should be marked as Output.
  How can I change it?</p>
  
  <p><img src="https://i.stack.imgur.com/bWQRE.png" alt="enter image description here"></p>
  
  <p>Although these two issues I have executed the code:</p>
  
  <p><img src="https://i.stack.imgur.com/Qp8bn.png" alt="enter image description here"></p>
  
  <p>and I got the following exception:</p>
  
  <pre><code>EntityCommandCompilationException
  An error occurred while preparing command definition. See the inner exception for details.
  </code></pre>
  
  <p>and the InnerException:</p>
  
  <pre><code>The function import 'DataModelEntities.AssignMaxSalesRef' cannot be executed because it is not assigned to a storage function.
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/nnoZW.png" alt="enter image description here"></p>