A little while ago, Microsoft released the first CTP of Entity Framework Power Tools.
Those power tools work on top of EF 4.1 and provide the following exciting features:
- Reverse Engineer a Code First Model from an existing database. Now this comes with the caveat that everything is configured through the fluent API even when convention would have been sufficient. In the future, this might be optimized.
- For any existing class derived from DbContext:
- See the entity data model: the same designer view as for model-first, but read-only
- See corresponding EDMX (XML representation of the model)
- See SQL DDL (SQL schema generated by Code First)
- Generate a pre-compiled version of the model to improve start-up performance
In a lot of scenarios, you might have an existing database or a database you want to design directly (schema first) but you still want a lot of properties of the code-first paradigm (e.g. POCO objects). This power tool kit removes the friction of using EF code-first in such scenarios.