c# - 'The model backing the '' context has changed since the database was created' - in different project -


i'm using ef code first approach , have static method used authentication. if call inside project, works fine, if call different project following error:

the model backing '' context has changed since database created. consider using code first migrations update database...

any ideas why might happening?

the solution is:

  1. add entity framework each project
  2. inside project raise database add global.asax
  3. inside application_start add following line:

    database.setinitializer< namespace.entities>(null);

where namespace.entities address dbcontext.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -