LINQ to SQL maps "out" parameters in
SPROCs as reference parameters (ref keyword), and for value types declares
the parameter as nullable.
For example, consider the below
"GetCustomerDetails" SPROC which takes a CustomerID as an input
parameter, and which returns the company name as an output
parameter in addition to its order history as a query result:
If we drag the above SPROC onto our
"Order" class in the LINQ to SQL designer, we could then write the
below code to call it:
Notice in the code above how the SPROC helper method returns
back a sequence of Order objects - but also then returns the CompanyName as an
output parameter to the helper method.