Extending the Entity Data Model Tools

[This page is specific to the latest version of the Entity Framework. The latest version is available as the 'Entity Framework' NuGet package. For more information, see Entity Framework Releases and Versioning.]

You can extend the functionality of the ADO.NET Entity Data Model Tools by using classes in the Microsoft.Data.Entity.Design.Extensibility namespace to write Visual Studio extensions. Classes in the Microsoft.Data.Entity.Design.Extensibility namespace allow you to do the following actions:

Note

For code examples of the following extensions, see the ADO.NET Entity Data Model Designer Extension Starter Kit.

The functionality described above can be combined in one Visual Studio extension. For example, you could load a .uml file by using the OnAfterFileLoaded method (which will convert the file to an .edmx format), then modify the .edmx file with the OnAfterModelLoaded method before it is displayed in the Entity Designer. Conversely, you could modify a loaded .edmx file with the OnBeforeModelSaved method, then convert it to a .uml file with the OnBeforeFileSaved method before it is saved.

Also note that multiple implementations of the extension interfaces can be implemented in the same Visual Studio extension. For example, multiple implementations of the IModelTransformExtension interface could, in turn, make modifications to an .edmx file before it is displayed in the Entity Designer or before it is saved.

For information about writing Visual Studio extensions, see Developing Visual Studio Extensions and Managed Extensibility Framework (MEF).

For information about customizing other functionality of the Entity Data Model Tools, see How to: Customize Object-Layer Code Generation and How to: Customize Database Generation.

In This Section

See Also

Concepts

Entity Framework Designer

Build Date:

2013-06-19