EF Power Tools Beta 3 Available

 


The information in this post is out of date.

Visit msdn.com/data/ef for the latest information on current and past releases of EF.

For EF Power Tools see https://msdn.com/data/jj593170


The Entity Framework Power Tools provide additional design-time tools in Visual Studio to help you develop using the Entity Framework. Beta 3 of the Power Tools is now available.

 

Where do I get it?

The Entity Framework Power Tools are available on the Visual Studio Gallery.

You can also install them directly from Visual Studio by selecting 'Tools -> Extension Manager...' then searching for "Entity Framework Power Tools" in the Online Gallery.

 

What's new in Beta 3?

Beta 3 is primarily a bug fix release and includes fixes for the following issues:

 

Future of the Power Tools

We are making an effort to consolidate and simplify the tooling for EF. As part of this effort we will be taking the functionality from the Power Tools and incorporating it into the EF Designer. There is a feature specification on our CodePlex site that outlines some of this work.

This means that we won't be releasing an RTM version of the Power Tools. However, we will continue to maintain Beta releases of the Power Tools until the functionality becomes available in a pre-release version of the EF Designer.

 

Support

This release is a preview of features that we are considering for a future release and is designed to allow you to provide feedback on the design of these features.

If you have a question, ask it on Stack Overflow using the entity-framework tag.

 

Compatibility

The Power Tools are compatible with Visual Studio 2010 and 2012 and Entity Framework 4.2 thru 6.0.

There are some temporary limitations that we will address in a future release:

  • The 'Generate Views' functionality is currently disabled when using EF6.
  • The 'View Entity Data Model (Read-only)' functionality does not work when using EF6 in Visual Studio 2010.

 

What does it add to Visual Studio?

EF Power Tools Beta 3 is for Code First, model-first, and database-first development and adds the following context menu options to an 'Entity Framework' sub-menu inside Visual Studio.

When right-clicking on a C# project

  • Reverse Engineer Code First 
    This command allows one-time generation of Code First mappings for an existing database. This option is useful if you want to use Code First to target an existing database as it takes care of a lot of the initial coding. The command prompts for a connection to an existing database and then reverse engineers POCO classes, a derived DbContext, and Code First mappings that can be used to access the database.
    • If you have not already added the EntityFramework NuGet package to your project, the latest version will be downloaded as part of running reverse engineer.
    • The reverse engineer process by default produces a complete mapping using the fluent API. Items such as column name will always be configured, even when they would be correctly inferred by conventions. This allows you to refactor property/class names etc. without needing to manually update the mapping.
      • The Customize Reverse Engineer Templates command (see below) lets you customize how code is generated.
    • A connection string is added to the App/Web.config file and is used by the context at runtime. If you are reverse engineering to a class library, you will need to copy this connection string to the configuration file of the consuming application(s).
    • This process is designed to help with the initial coding of a Code First model. You may need to adjust the generated code if you have a complex database schema or are using advanced database features.
    • Running this command multiple times will overwrite any previously generated files, including any changes that have been made to generated files.
  • Customize Reverse Engineer Templates 
    Adds the default reverse engineer T4 templates to your project for editing. After updating these files, run the Reverse Engineer Code First command again to reverse engineer POCO classes, a derived DbContext, and Code First mappings using your project's customized templates.
    • The templates are added to your project under the CodeTemplates\ReverseEngineerCodeFirst folder.

When right-clicking on a code file containing a derived DbContext class

  • View Entity Data Model (Read-only)  
    Displays the Code First model in the Entity Framework designer.
    • This is a read-only representation of the model; you cannot update the Code First model using the designer.
  • View Entity Data Model XML 
    Displays the EDMX XML representing the Code First model.
  • View Entity Data Model DDL SQL 
    Displays the DDL SQL to create the database targeted by the Code First model.
  • Generate Views 
    Generates pre-compiled views used by the EF runtime to improve start-up performance. Adds the generated views file to the containing project.
    • View compilation is discussed in the Performance Considerations article on MSDN.
    • If you change your model then you will need to re-generate the pre-compiled views by running this command again.

When right-clicking on an Entity Data Model (*.edmx) file

  • Generate Views 
    This is the same as the Generate Views command above except that, instead of generating pre-compiled views for a Code First model, it generates them for a model created using the EF Designer.