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.