title: capture output parameter from stored proc in LINQ To SQL ExecuteQuery
body: <p>Is it possible to get an output parameter back from the LINQ To SQL DataContext when you execute a stored procedure?</p>
  
  <pre><code>IEnumerable&lt;Address&gt; result = 
      ExecuteQuery&lt;Address&gt;(((MethodInfo)(MethodInfo.GetCurrentMethod())), 
         address, pageIndex, pageSize, totalCount);
  </code></pre>
  
  <p>where <code>address</code>, <code>pageIndex</code> and <code>pageSize</code> are input parameters, and <code>TotalCount</code> is an output parameter.</p>
  
  <p>How can you capture the output param?</p>
  
  <p>here is another attempt at doing it but again cannot get the parameter value:</p>
  
  <pre><code>
      [Function(Name = "Telecom.AddressSearch")]
          private IEnumerable SearchAddress([Parameter(Name = "address", DbType = "varchar")] string address,
                                               [Parameter(Name = "pageIndex", DbType = "int")] int pageIndex,
                                               [Parameter(Name = "pageSize", DbType = "int")] int pageSize,
                                               [Parameter(Name = "totalCount", DbType = "int")] ref int totalCount)
          {            
              IEnumerable result = ExecuteQuery(((MethodInfo)(MethodInfo.GetCurrentMethod())), address, pageIndex, pageSize, totalCount);
  
              return result;
          }</code></pre>