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.
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.
"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.
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.
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?