title: Entity Framework Enums as POCO only
body: <p>I am trying to save an Enum that exists in my model down to the database but everytime I do Entity Framwework complains that there is no look up table associated with the Enum. I do not want a look up table, I just want the enum to exist in code and be stored as integers in the database.</p>
  
  <blockquote>
    <p>An error occurred while saving
    entities that do not expose foreign
    key properties for their
    relationships. The EntityEntries
    property will return null because a
    single entity cannot be identified as
    the source of the exception. Handling
    of exceptions while saving can be made
    easier by exposing foreign key
    properties in your entity types. See
    the InnerException for details.</p>
    
    <p>"Cannot insert the value NULL into
    column 'Type', table
    'Test.dbo.Interests'; column
    does not allow nulls. INSERT
    fails.\r\nThe statement has been
    terminated.</p>
  </blockquote>
  
  <p>The value for Type is definitely not null, EF just treats it that way cause it can't find a Foreign key table that I don't want in the first place. </p>
  
  <p><strong>How do I get entity framework to treat my enum as an int and then convert back out when I call down to the database to retrieve my model?</strong></p>