title: Entity Framework returns null object when row has null values
body: <p>I have an existing database (<strong>which I cannot modify in any way</strong>) that I'd like to use EF to code against. There are no primary keys, foreign keys or actual relationships between tables - everything seems to be handled by applications using the DB.  For most of the tables/entities, this has been trivial. However, I've got one class, like the one below (simplified) that I'm struggeling with.</p>
  
  <pre><code>[Table("tableName")]
  public class MyClass
  {
      [Key]
      [Column("id")]
      public int? Id { get; set; }
  
      [Column("name")]
      public string CompanyName { get; set; }
  
      [Column("address")]
      public string Address { get; set; }
  }
  </code></pre>
  
  <p>Things like <code>_context.MyClasses.Where(x =&gt; x.Address == "something")</code> work fine. However, it seems that when the id column is NULL in the DB, i get a null object back - even though CompanyName and Address have values. And I need those values, regardless of whether id (or whatever else) is null. Is there some way to force EF to generate the objects and ignore empty columns?</p>
  
  <p>Removing or movin the [Key] attribute gives me an exception like "Must have a key column" (and the Id-column is also used to map a collection of other classes into this one if there are any that match).</p>
  
  <p><strong>UPDATE</strong> Don't think about the Id-column as an actual identifier. It's basically just an integer with a stupid name.</p>