Models that support the "weshopdb" context have changed since the database was created. Consider migrating the update database using Code first

Source: Internet
Author: User

After the completion of the framework of the EF, for one of the table added a field, the program run time has been reported this error, depressed a late self-study, but by looking for information, search the answer on the Internet, find a number of solutions to solve this problem, I share his hope can help you

Method One: Add such a sentence in the Application_Start () method in the Global.asax file, then clean up the solution and run it again, but also require the entity Framework 6.0.0 to upgrade to 6.1.0 or later.

Method Two: Add in the Application_Start () method in the Global.asax file, then clean up the solution and run it again.

Method Three: Delete the table in the database to detect the change of the model.

Method Four: If the above still does not solve the problem, check your project UI layer

Models that support the "weshopdb" context have changed since the database was created. Consider migrating the update database using Code first

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.