I'm using code first and migration to update my db. I have a lookup table and a correspond enum. my table: States
Id | State
---|-------
|
My enum:
public enum States
{
good = 1,
bad = 2
}
I want to fill State
table with the values of the enum,
so if I change the enum values - the table will be changed in accordance.
I googled a lot but couldn't find anything clear about it.
Any basic example will be appreciated.