title: Model validation error: EntityType has no key defined. Define the key for this EntityType
body: <p>I changed an attribute of my model from <code>string</code> to <code>CultureInfo</code>, and am now getting this error when I try to load any CRUD view (besides the <code>Create</code> form).</p>
  
  <p>Error:</p>
  
  <pre><code>One or more validation errors were detected during model generation:
  
  MyProject.Models.CultureInfo: : EntityType 'CultureInfo' has no key defined. Define the key for this EntityType.
  MyProject.Models.DateTimeFormatInfo: : EntityType 'DateTimeFormatInfo' has no key defined. Define the key for this EntityType.
  CultureInfoes: EntityType: EntitySet 'CultureInfoes' is based on type 'CultureInfo' that has no keys defined.
  DateTimeFormatInfoes: EntityType: EntitySet 'DateTimeFormatInfoes' is based on type 'DateTimeFormatInfo' that has no keys defined.
  </code></pre>
  
  <p>Model: </p>
  
  <pre><code>namespace MyProject.Models
  {
      public class Project
      {
          public Project()
          {
              Sites = new List&lt;Site&gt;();
          }
  
          [Key]
          public int Id { get; set; }
  
          [Required]
          [DisplayName("Name")]
          public string Name { get; set; }
  
          [Required]
          [DisplayName("Culture")]
          [UIHint("ProjectCulture")]
          public CultureInfo Culture { get; set; }
  
          // (...)
      }
  }
  </code></pre>
  
  <p>In <code>Application_Start()</code>:</p>
  
  <pre><code>Database.SetInitializer(new DropCreateDatabaseIfModelChanges&lt;ProjectDbContext&gt;());
  </code></pre>
  
  <p>Looking at similar issues with the same error, I have not found a solution that worked for me. I assume there is a problem mapping <code>CultureInfo</code> with the Entity Framework, because the issue only appeared after I changed the type of this attribute, but <em>how can I solve this error without changing it back?</em></p>