title: EF5 code first enum support - define the enum inside the entity
body: <p>Funny question..</p>
  
  <p>I have a type that has a Status field. For my convenience and order of things I want to define the enum for this status inside the Entity type:</p>
  
  <pre><code>public class User
  {
    public enum Statuses
    {
       Active,
       Suspended
    }
  
    public int ID { get; set; }
    public Statuses Status { get; set; }
  }
  </code></pre>
  
  <p>For some reason the Status property isn't mapped to the database.</p>
  
  <p>Now the funny bit - if I take the enum definition out of User then it is mapped to the DB!</p>
  
  <p>I know that the quick answer would be to leave it outside the class, but that would require me to give the enum a longer name UserStatuses or something like that, as now it isn't scoped inside User.</p>
  
  <p>Did anyone encounter that issue? Is there a solution before I start compromising?</p>
  
  <p>Thanks!</p>