I am trying to execute stored procedure from bcontext.Database.SqlQuery using EF5.
It is throwing an error must declare the scalar variable \'@custid\'<
must declare the scalar variable \'@custid\'
Since you're using named parameters, you have to specify the matching name for the parameter you're passing.
var results = _MiscContext.Database.SqlQuery( "exec sp_GetStaff @custid", new SqlParameter("custid", customerNumber)).ToList();