EF console Common commands

Source: Internet
Author: User
Open the nuget package management console and enter: Enable-migrations Press enter. If yes, code first migration is enabled for project XXX. Here are several possible errors: 1.no context type was found in the Assembly XXX does not find the database context in the current project, that is, the database inherited by dbcontext. CS "2.The entityframework package is not installed on Project XXX the current project has found the data context, but no entityframework requires installation and input install-package entityframework) if the installation is successful, the migrations folder appears in the project, which records the changes in each data migration. It is very easy to use, and there is no need to delete the database to regenerate data loss and other issues. Common statement: Enable-migrations-force replace migration data file update-database update add-migration add new update File

EF console Common commands

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.