I have implemented an asp.net web API with the code first approach. Now I need to add a property to some of the models. I alter the DB table and add a field, I got this error:
System.InvalidOperationException HResult=0x80131509 Message=The model backing the 'GameContext' context has changed since the database was created. Consider using Code First Migrations to update the database (http://go.microsoft.com/fwlink/?LinkId=238269). Source=<Cannot evaluate the exception source> StackTrace: <Cannot evaluate the exception stack trace>
I googled and came across adding below to the global.asax:
I wonder is it OK to use this on the production? Any suggestions would be great.
Thanks in advance.