BT

InfoQ Homepage News Introducing the Entity Framework Power Tools

Introducing the Entity Framework Power Tools

Bookmarks

The introduction of a Code First option in Entity Framework has received quite a bit of praise. While it still has a long way to go before it unseats the reigning ORM, nHibernate, the progress Microsoft is making is quite astounding. In order to keep the momentum up Microsoft is releasing a set of power tools that will take an existing database and create a Code First representation.

At first glance it seems rather odd to offer way to reverse engineer a database into a code-first model. But there really is a few useful ideas behind this. The first one is merely educational. Unlike the designer-driven workflows from previous versions of Entity Framework, Code First leaves you with a blank slate and no real clues on how to start. Developers can create part of their database first, or even just toy projects, and then use this tool to see what the matching Entity Framework classes should look like. From there they can build out the rest of the classes and then have it generate the full database schema.

Another interesting idea comes into play when you combine this with third-party databases and providers. You could, for example, use this to reverse engineer a SQL Server database and the recreate it in Oracle, MySQL, PostgreSQL or SQLite using Devart’s dotConnect libraries.

Currently the reverse engineering tool is available in EF Power Tools CTP1. Being just a preview, it only supports SQL Server and C#. To install, download it from the Visual Studio Gallery. You will also need to install EF 4.1 using NuGet.

Rate this Article

Adoption
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

  • Sample Code

    by Jonathan Allen /

    Your message is awaiting moderation. Thank you for participating in the discussion.

    If you take a look at the "LeadTracker" project you can see some database schema (LeadTracker Database) and the code generated by the tool (LeadTracker.EFCodeFirst).

    granite.codeplex.com/SourceControl/list/changesets

  • preview

    by Stefan Wenig /

    Your message is awaiting moderation. Thank you for participating in the discussion.

    "Being just a preview, it only supports SQL Server and C#."

    That sounds as is if would support Oracle etc. past preview. Of course it won't, Devart might.

  • Re: preview

    by Jonathan Allen /

    Your message is awaiting moderation. Thank you for participating in the discussion.

    If you want that to happen make sure you let the ADO.NET team know. Developer feedback is heavily driving their design decisions.

  • Comments

    by Devart Team /

    Your message is awaiting moderation. Thank you for participating in the discussion.

    “Being just a preview, it only supports SQL Server and C#.”
    Actually, EF Power Tools allow working with Oracle, MySQP, PostgreSQL, and SQLite. The CTP1 has a problem connected with config-file stored connecting string processing. However, there are some workarounds to overcome these difficulties. You can find more information about it at: www.devart.com/blogs/dotconnect/index.php/using...

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

BT

Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
Country/Zone:
State/Province/Region:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.