Usefulness of Entity Framework for Objects-First Design

B

BGU

Hello, I have been looking into the ADO.NET Entity Framework. A
lot of the features deal with generating classes from databases. What
about generating databases from classes?

I was looking for a true ORM solution that allows the developer to
abstract away from the database. I.e., the developer should write the
classes first--then, the ORM product should generate the tables &
relationships. So, two questions--can Entity Framework create the
tables, and, if not, do we know why Microsoft is taking a "database-
first" approach to design?

Thanks,
BGU
 
F

Frans Bouma [C# MVP]

BGU said:
Hello, I have been looking into the ADO.NET Entity Framework. A
lot of the features deal with generating classes from databases. What
about generating databases from classes?

I was looking for a true ORM solution that allows the developer to
abstract away from the database. I.e., the developer should write the
classes first--then, the ORM product should generate the tables &
relationships. So, two questions--can Entity Framework create the
tables, and, if not, do we know why Microsoft is taking a "database-
first" approach to design?

the EF can't do this, they said it will do it in v2.0

though starting with the db isn't that bad, after all: if you map a
class to a table or a table to a class, either way you started with the
projection result of an abstract entity definition. Generating a
database from a set of classes is not going to be optimal unless you
create your classes according to an abstract entity model, which is the
same for tables: if you use an abstract entity model to produce tables,
you get a good normalized table design, which you then can reverse
engineer to a set of classes.

FB

--
------------------------------------------------------------------------
Lead developer of LLBLGen Pro, the productive O/R mapper for .NET
LLBLGen Pro website: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top