title: Linq where sublist contains a partial value
body: <p>I want to search for items where the search term exists within one of its sub items</p>
  
  <p>For example I have a device with settings, I want a list of all devices which have a DeviceSetting with <code>Id=1</code> and <code>value.Contains("test")</code>. I am using LINQ to SQL so if anything can be done to keep this fast (and avoid projection to POCO) that would be great</p>
  
  <p>How do I achieve this?</p>
  
  <pre><code>Device
  {
     List&lt;DeviceSetting&gt; Settings { get; set; }
  }
  
  DeviceSetting
  {
      int Id;
      string value;
  }
  
  var devices = new List&lt;Device&gt;(); // populated from EF
  
  var search = "test";
  var results = devices.Where(d =&gt; d.Settings.Contains(searchTerm));
  </code></pre>