title: SELECT NEW with a potentially null field using LINQ and Entity Framework
body: <p>I want to quickly select some rows, format it nicely for a dropdownlist/selectlist or something like that - but I have a field in the db, that is nullable (DateOfBirth).</p>
  
  <pre><code>var athletes = (from at in _db.Athletes
             select new{
                    Name = at.Name + " " + at.DateOfBirth, 
                    Id = at.AthleteId 
                    }).ToList();
  </code></pre>
  
  <p>Is there a way to handle nullable types inside the LINQ in a case like this?</p>
  
  <p>Edit: </p>
  
  <p>I was not paying attention to the fact, that since this is using entity framework, methods that work with standard LINQ cannot be used unless they have a SQL translation.</p>
  
  <ul>
  <li>DateOfBirth is a Nullable &lt; DateTime > </li>
  <li>Source is Entity Framework 4</li>
  </ul>