In addition to supporting a designer-based development
workflow, EF4 also enables a more code-centric option which we call “code first
development”. Code-First Development enables a pretty sweet development
workflow. It enables you to:
Develop without ever having to open a designer or define an
XML mapping file
Define your model objects by simply writing “plain old
classes” with no base classes required
Use a “convention over configuration” approach that enables
database persistence without explicitly configuring anything
Optionally override the convention-based persistence and use
a fluent code API to fully customize the persistence mapping
EF’s “code first development” support is currently enabled
with a separate download that runs on top of the core EF built-into .NET
4. CTP4 of this “code-first” library shipped this week and can be downloaded here.
It works with VS 2010, and you can use it with any .NET 4
project (including both ASP.NET Web Forms and ASP.NET MVC).