title: Use LINQ in C# to find MondoDB records when values in a list field match a criteria value from a list
body: <p>I want to use LINQ to return all records in a MongoDB collection where the field in the record is a list of strings and any string in the list matches any string value in a list of strings used as the search criteria:</p>
  
  <p>Mongo Record in Collection ("Item"):</p>
  
  <pre><code>{
      "_id": ...,
      "StringList": [
          "string1",
          "string2",
          "string3"
      ],
      ...
  }
  </code></pre>
  
  <p>Search Criteria:</p>
  
  <pre><code>var criteria = new List&lt;string&gt; { "string2", "string4" };
  </code></pre>
  
  <p>My Code:</p>
  
  <pre><code>var foundItems = iMongoDataProvider.FindAll&lt;Item&gt;()
                             .Where(x =&gt;x.StringList.ContainsAny(criteria)).ToList();
  </code></pre>
  
  <p>Based on the above, the Mongo record should be returned since one of the <em>StringList</em> values matches one of the values in the search <em>criteria</em>.  Nothing is returned even though I can manually peruse the collection and find the matching record.  What am I doing wrong?  Can someone provide an example that will do what I need?  Thanks!</p>