title: must declare the scalar variable '@custid' using dbcontext.Database.SqlQuery?
body: <p>I am trying to execute stored procedure from bcontext.Database.SqlQuery using EF5.</p>
  
  <p>It is throwing an error <code>must declare the scalar variable '@custid'</code></p>
  
  <pre><code>  var results = _MiscContext.Database.SqlQuery&lt;int&gt;(
                "exec sp_GetStaff @custid",
                customerNumber).ToList&lt;int&gt;();
  </code></pre>
  
  <p>SP returns <code>1</code> if customerNumber is staff otherwise it return <code>empty</code> row.</p>
  
  <pre><code>ALTER PROCEDURE [dbo].[sp_GetStaff]
      @custid varchar(12)
  AS
  BEGIN
  
      SET NOCOUNT ON;
  SELECT 
  1 AS [C1]
  FROM  [dbo].[Staff] with (nolock)
  WHERE [CUSTOMER_ID] = @custid
  
  
  END
  </code></pre>
  
  <p>How to manage this?</p>