title: How to call stored procedure in EF code-first approach?
body: <p>I'm using Entity Framework with a code-first approach. Can you provide some suggestions on how to call a stored procedure from my code?</p>
  
  <p>Stored procedure:</p>
  
  <pre><code>create procedure sp_GetCountry
  As
  Begin
      select * 
      from Country
  End
  </code></pre>
  
  <p><code>Homectrol.cs</code>:</p>
  
  <pre><code> JanContext db = new JanContext ()
  
   public JsonResult GetCountry_sp()
   {
       string storedprocedure = "sp_GetCountry";
   }
  </code></pre>