The model that supports the "WeShopDb" context has been changed after the database is created. Please consider using Code First to migrate and update the database,

Source: Internet
Author: User

The model that supports the "WeShopDb" context has been changed after the database is created. Please consider using Code First to migrate and update the database,

After the EF framework is set up, a field is added to one of the tables. This error is always reported during the running of the program. I am depressed for a late self-study. However, by searching for information, I search for answers online, I have found several solutions to solve this problem. I will share it with you and hope it will help you.

Method 1. add this sentence to the Application_Start () method in the asax file, then clean up the solution and run it again. However, the Entity Framework 6.0.0 must be upgraded to version 6.1.0 or later.

Method 2: add the Application_Start () method in the Global. asax file, clear the solution, and run it again.

Method 3: delete the table that detects model changes in the database.

Method 4: If the problem persists, check the UI Layer of your project.

 

Related Article

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.