title: Linq - check if the any of the values present in an array exists in the database table
body: <p>I am exploring if there is a way to check if any of the values present in an array are present in a table without using a loop.</p>
  
  <p>So even if 1 value is present in the table the method should return true, if none of the values are present then it should return the default false.</p>
  
  <p>I am thinking like the below, below is not a working code just an idea.. so wanted to check if there is an efficient way to achieve this.</p>
  
  <pre class="lang-cs prettyprint-override"><code>public bool CheckTable(string strList)
  {
      bool IsPresent = False;
      String[] Arr = strList.split(',');
      foreach(string str in Arr)
      {
          var x = DBContext.TableEmployees.where(e =&gt; e.Location == str).select(e =&gt; e.Location);
          if(x == null)
          {
              isPresent = false;
          }
          else
          {
              isPresent = true;
          }
      }
  }
  </code></pre>