title: What to do when your passing in a collection of zero into a hql request?
body: <p>I have this</p>
  
  <pre><code>     public List&lt;TableA&gt; Get(Guid Id, List&lt;int&gt; listId)
      {
          const string query = "FROM TableA WHERE MyListColumn in (:listId) AND Id in (:Id)";
          return session.CreateQuery(query).SetParameterList("listId", listId).SetParameter("Id",Id).List&lt;TableA&gt;().ToList();
      }
  </code></pre>
  
  <p>I am wondering what to do if keys count equals zero? When using a linq way it would jsut return an empty List of TableAs. The only way I can think of is a "if" statement but I am wondering if there is any other way before I do that since I don't want really logic in my method here as it is a repo method.</p>
  
  <pre><code>if(listId.Count == 0){..}
  </code></pre>
  
  <p>As I get this error</p>
  
  <blockquote>
    <p>Server Error in '/' Application. An
    empty parameter-list generate wrong
    SQL; parameter name 'listId'</p>
  </blockquote>