title: How to call stored procedure in preprocess query
body: <p>I got a stored procedure that returns all data I need to view in a screen. My question is simple, how do I call the stored procedure, with a parameter?</p>
  
  <pre><code>partial void Query1_PreprocessQuery(int? UserSaveId, ref IQueryable&lt;RuleEntry&gt; query)
  {
       query = ????   
  }
  
  CREATE PROCEDURE [dbo].[FilterRuleEntriesByUserSaveId]
  @userSaveId INT
  AS    
  BEGIN
  WITH records
  AS
  .......
  .......
  SELECT  [One], [Two], [Three]
  FROM    records 
  WHERE   rn = 1
  END
  </code></pre>
  
  <p>Thanks</p>