LINQ select from table where fieldValue is in another tables list of values
<p>dbContext</p>

<pre><code>class Table1

public string Id1 { get; set; }
public string Field { get; set; }
public string Id2 { get; set; }
public virtual Table2 Table2 { get; set; }

class Table2

public string Id2 { get; set; }
public string Field { get; set; }
</code></pre>

<p>I need to search all records from <code>Table1</code> where <code>Table1Field</code> is in the other table list of values.</p>

<p>For example first I select all values which matches this search parameter</p>

<pre><code>IQueryable&lt;Table2&gt; listOfvalues = from b in dbContext.Table2 
                                  where b.Field1.Contains(searchParam) 
                                  select b;
result = listOfvalues.ToList();
</code></pre>

<p>And now I need to write code which returns all fields from <code>Table1</code> where Field is in that <code>listOfValues</code>.</p>