must declare the scalar variable '@custid' using dbcontext.Database.SqlQuery?

前端 未结 2 344
你的背包
你的背包 2021-01-17 11:22

I am trying to execute stored procedure from bcontext.Database.SqlQuery using EF5.

It is throwing an error must declare the scalar variable \'@custid\'<

2条回答
  •  迷失自我
    2021-01-17 11:35

    Try

    var results = _MiscContext.Database.SqlQuery(
                  "exec sp_GetStaff {0}",
                  customerNumber).ToList();

提交回复
热议问题