I'm a beginner with the use of Entity Framework : I have done a web application using EF so i created a local Sql Server database and i added a context class EFDbContext.
When i run the application in another machine i got this error :
The model backing the 'EFDbContext' context has changed since the database was created. Consider using Code First Migrations to update the database (http://go.microsoft.com/fwlink/?LinkId=238269).
i think it is because the local database is missing. So i need to know:
- In a similaire case, How can i restore my database?
- What are the differences between managing databases with
Sql Server Managerand theintegrated connection toolin VS ?
localhost, you have to change it to local IP address or network name of the database hosting machine. There may be other issues (according to the error message) but first you need to make sure you can connect to the database.enable-migrations(2). PM>add-migration db_migrationX(3). PM>update-database. Note: you may not need (1) and (2) if you have created migrations before.