title: NHibernate IN Expression / Restrictions Hitting 2100 Parameter Limit SQL Server
body: <p>Is there a way to force NHibernate to run a query without executing it as a parameterized query. Basically I'm running into an issue where I am hitting SQL Server's 2100 parameter limit. </p>
  
  <p>I'm hitting a limit because of an "IN" restriction on my query. For reasons I won't get into details about I need to use an NHibernate In Restriction on my query.  </p>
  
  <pre><code>Query.Add(Restrictions.In("df.ID", myList));
  </code></pre>
  
  <p>I've run NHibernate profiler on the query and NHibernate is passing every "In" value as a parameter rather than a literal value. </p>
  
  <p>myList is an array with over 5201 values. I've researched online, there is no limit on how many IN values you can pass to SQL so if I can get NHibernate to pass the values as literal values instead of parameters that should fix my problem. </p>
  
  <p>Any help would be appreciated. Also please don't comment on my use of the IN statement, I've run into an issue where my query requires me to use the IN statement in this way and I can't approach it any other way. </p>