I am currently in the early stages of creating a MVC application. I am creating the database using code-first and am wondering what the recommended protocol is to store constant values. To give some context, I have a model class called Appointments which is mapped to a SQL Table. An Appointment can be in one of many states e.g. 'Ready', 'Waiting', 'Cancelled' etc. Normally I would create a Statuses table in SQL and have a foreign key between the Appointment and Statuses table and have a enumeration in my code that I use to assign Statuses i.e.
Appointment app = new Appointment()
{
StatusID = (int)ExternalClass.Statuses.Waiting
};
Is this the recommended best practice? My only concern is that I am relying on the id's of the rows in SQL matching up to the enumeration and not sure if this will always be the case. Any suggestions of better methods would be appreciated.