Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
1.50/5 (2 votes)
See more:
The model backing the 'ProductContext' context has changed since the database was created. Consider using Code
error show why plz help me
i was deleted migration folder then
1.enable-migration
2.add-migration "xxx"
3.update-database -f
after all step again same error
The model backing the 'ProductContext' context has changed since the database was created. Consider using Code


What I have tried:

update-database in migration attempt after The model backing the 'ProductContext' context has changed since the database was created. Consider using Code
Posted
Comments
John C Rayan 8-Jun-17 4:01am    
You need your migration folder for migrations. Why did you remove the migration folder , any reason? Try to restore the migration folder and try again.
Afzaal Ahmad Zeeshan 8-Jun-17 5:16am    
Now try to use a database-first approach to get your migrations back, then start using the code-first.

I don't understand why you deleted the generated code files. It's impossible to go back or get back the migrations that you need to apply. However, there is a workaround that you delete everything that was created by Entity Framework and restart the process.
vermanishad 12-Jun-17 2:34am    
i just checking migration folder when i will deleted then wht problems i will face but now it resolved

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900