Normally, when you want to call a stored procedure directly through Linq to Sql, you can use the ExecuteQuery method:
result = dc.ExecuteQuery<MyTable>("Exec myStoredProcedure");
And if you need to call it with parameters, you can add them through string substitution:
string query = "Exec myStoredProcedure ";
for (int i = 0; i < parameters.Count - 1; i++) {
query += " {" + i + "},";
}
query = query.TrimEnd(',');
result = dc.ExecuteQuery<MyTable>(query, parameters);
But what if one of the parameters is an output variable? Is it possible to get the value back after the procedure has been run?