title: SQL Server : select from a table with paging, dynamic column sorting, and dynamic column filter
body: <p>I have a table <code>Person</code> with 3 columns <code>Id</code>, <code>FirstName</code> and <code>LastName</code>.</p>
  
  <p>Is it possible to create a stored procedure that contains paging, a dynamic sort columns, and a dynamic filter columns without composing the SQL query with a string and then executing it (<code>sp_executesql</code>)?</p>
  
  <p>Params were: </p>
  
  <pre><code>page, pageSize, sortColumn, sortOrder, filterColumn, filterSearchString
  </code></pre>