The usage and problems of EF6 Power Tools, ef6tools

Source: Internet
Author: User

The usage and problems of EF6 Power Tools, ef6tools

Environment: vs2013 + EF: 6.1.3.0 + Power Tools: Beta 4

Power tools: a reverse engineering that can be used to generate Code in Code Frist mode when a database already exists.

Problem:

It is generated by the entire database. The problem is that it treats the view as a table and generates entities, such:

The ing file is also generated in the Map directory, for example:

Then, I deleted the migration file. After the migration file is generated, the following message is displayed during update-database: you cannot perform the Drop Table operation on the View. You must use Drop View. open the generated migration file and you will find that the file is processed by table. The generated code is also DropTable and CreateTable.

Therefore, there is no way to comment it out and then update-database.

Usage:

You can use Power Tools to Generate Pre-Generated Mapping Views to improve EF's initial loading performance. Right-click the Context and choose Entity Framework> Generate Views, as shown in:

Shows the generated file:

All are some ESQL statements, and it will automatically load when EF is started for the first time, which is very convenient.

 

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.