title: Getting rows from a SQL table matching a dictionary using LINQ
body: <p>I have the following code snippet:</p>
  
  <pre><code>    var matchingAuthors = from authors in DB.AuthorTable
                            where m_authors.Keys.Contains(authors.AuthorId)
                            select authors;
  
      foreach (AuthorTableEntry author in matchingAuthors)
      {
          ....
      }
  </code></pre>
  
  <p>where <code>m_authors</code> is a Dictionary containing the "Author" entries, and <code>DB.AuthorTable</code> is a SQL table. When the size of m_authors goes beyond a certain value (somewhere around the 3000 entries mark), I get an exception:</p>
  
  <pre><code>System.Data.SqlClient.SqlException: The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. 
  Too many parameters were provided in this RPC request. The maximum is 2100.
  </code></pre>
  
  <p>Is there any way I can get around this and work with a larger size dictionary? Alternatively, is there a better way to get all rows in a SQL table where a particular column value for that row matches one of the dictionary entries? </p>