title: LINQ to Entities .contains is ignoring results with NULL
body: <p>I am new to the Entity Framework, and am struggling with what I hope is a basic problem. My code is here:</p>
  
  <pre><code>    Dim accounts As List(Of STUDENT) =
          (From a In SA.STUDENTs
           Where (a.MATRIC_NO.Contains(matric) And a.FIRST_NAME.Contains(firstName) And a.MIDDLE_NAMES.Contains(middleName) And a.SURNAME.Contains(lastName) And a.PREFERRED_NAME.Contains(preferredName))
           Select a).ToList
  </code></pre>
  
  <p>The query runs fine, until one of the search fields is NULL in the database. If, for instance, a matric number is entered in the seach interface but middle name is left blank, the query will not return any records if middle name is NULL in the database. If middle name is a blank space in the database then it will return the record.</p>
  
  <p>Can anyone offer any pointers?</p>
  
  <p>Many thanks!</p>