LINQ pull records from a database where string list is from a model
<p>I have a database of strings that contain IDs.  I need to pass that list into a LINQ query so I can pull the correct records.</p>

<pre><code>model.SelectedDealers = db.dealers.Any(a =&gt; a.sdealer_name.Contains(UserToEdit.UserViewAccesses.Select(s =&gt; s.ViewReferenceNumber)));
</code></pre>

<p><code>SelectedDealers</code> is of type <code>dealers</code></p>

<p><code>ViewReferenceNumber</code> should be a list of <code>strings which should match sdealer_name</code></p>

<p>So essentially I am trying to find all of the <code>dealers</code> whos <code>sdealer_name</code> matches the list of <code>sdealer_names</code> I have in my <code>UserToEdit.UserViewAccesses</code></p>

<p>I've tried moving parts around and switching them in different spots and can't seem to figure this out.</p>