The database assistant uses CommandType by default, which is CommandType.Text. It is not possible to change this to CommandType.StoredProcedure, so you need to use the following syntax:
var data = db.Query("exec usp_MyProc @0, @1", "val1", val2");
The WebMatrix target audience is not aware of stored procedures. But you can always use simple ADO.NET and populate a strongly typed object through SqlDataReader. Or Entity Framework ....
source
share