I have a stored procedure that has three parameters and I\'ve been trying to use the following to return the results:
context.Database.SqlQuery
This solution is (only) for SQL Server 2005
You guys are lifesavers, but as @Dan Mork said, you need to add EXEC to the mix. What was tripping me up was:
:
context.Database.SqlQuery(
"EXEC ProcName @param1, @param2",
new SqlParameter("param1", param1),
new SqlParameter("param2", param2)
);