Usefulness of Entity Framework for Objects-First Design

  • Thread starter Thread starter BGU
  • Start date Start date
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
 
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#)
------------------------------------------------------------------------
 
Back
Top