title: Retrieve Mysql Stored Procedure Data Using Entity Framework 5
body: <p>I am using Mysql with Entity Framework 5. But using Entity Framework to execute a store procedure  I am not getting any data.</p>
  
  <p>I've tried these ways:</p>
  
  <p>1) Adding stored procedure to my edmx then execute that as a function.</p>
  
  <pre><code>var returnedData = db.MyStoredProcedureName(); // here db is the context
  </code></pre>
  
  <p>2) By following way:</p>
  
  <pre><code>var returnedData = db.Database.ExecuteSqlCommand("MyStoredProcedureName"); // here db is the context
  </code></pre>
  
  <p>Both times I am getting 0 (zero) as output.</p>
  
  <p>But the stored procure is supposed to return all data of a table ('select * from myTable').</p>