title: Pass operator to stored procedure
body: <p>I have an ASP.NET MVC 3 app that lets users to create their own filters. Something like <code>amount &gt; 5 and amount &lt;= 7</code>, and so on. The user can choose both the amount value and the operator.</p>
  
  <p>My problem is how to pass those filters to the stored procedure that retrieves the data. The stored procedure is already pretty complicated, meaning there are a lot of parameters passed which are checked to be null, so I can't really apply the answer I found here: <a href="https://stackoverflow.com/questions/8540149/t-sql-stored-procedure-dynamic-and-or-operator">T-SQL Stored Procedure - Dynamic AND/OR Operator</a></p>
  
  <p>Is there any other way I can do this?</p>