title: How to Execute Stored Procedure in MVC
body: <p>I want to Execute the Stored Procedure in My MVC application.</p>
  
  <p>I am using Database First approach &amp; I have created Some stored procedure like::</p>
  
  <pre><code>CREATE PROCEDURE [dbo].[TestProcedure]
  @parameter1 int
   AS
  set @parameter1 = 1
  return @parameter1
  </code></pre>
  
  <p>And I am using some code in My MVC action like this::</p>
  
  <pre><code> private CueEntities db = new CueEntities();
       public ActionResult ExecuteProcedure()
              {
                  var parameter1=new SqlParameter("parameter1",1);
                  var test = db.Database.SqlQuery&lt;CueEntities&gt;("exec TestProcedure @parameter1",parameter1);
                  var check=db.TestProcedure(1);
                  return Json(test);
  
              }
  </code></pre>
  
  <p>But I am not able to get the Returned value &amp; can't able to know that wether the Stored procedure is Executed or not.
  Please Help me on this ASAP.</p>