title: Null value cannot be assigned - LINQ query question
body: <p>I have the following LINQ query:</p>
  
  <pre><code>DataClassesDataContext dc = new DataClassesDataContext(); 
  var query = from contact in dc.Contacts
              select new
              {
                  ContactId = contact.ContactId,
                  LastName = contact.LastName,
                  FirstName = contact.FirstName,
                  Addresses = contact.Addresses,
                  Phones = contact.Phones,
                  DOB = contact.BirthDate,
                  LastNote = contact.Notes.Max(n =&gt; n.Created), //this line causes the error
                  Status = contact.ContactStatus.ContactStatusName,
                  EmailAddress = contact.Emails
              };
  </code></pre>
  
  <p>The line where I get the maximum created date for the notes collection causes the following exception to be thrown:</p>
  
  <blockquote>
    <p>Exception: The null value cannot be assigned to a
    member with type System.DateTime which
    is a non-nullable value type.</p>
  </blockquote>
  
  <p>How do I write the query to allow null values into the LastNote field?  The DOB field is defined as DateTime? and has not problem handling nulls.</p>