简体   繁体   中英

Map entities to database with Entity Framework

I've made a quite big domain model with entity framework. I wanted to know if it is possible to map it so i create automaticly the tables in the database wanted?

I've looked up edmgen.exe but still couldn't find the right command.

thank's for helping!

Edit1: I know the tool LightSpeed from Mindscape ofer this features that's why i think that entity framework does the same.

Edit2: Non one likes me...

currently this is not available but i thing this feature will be shipped with vs2010

According to this blog entry , it's currently (v1) not possible to create the database from an entity model.

About half way down, under the heading of "2. Process and tooling issues", you'll find:

  • It is not currently possible to create the database schema automatically from the Entity Model. This is simply extraordinary - as it seems to easy to do!

Let's hope for EF v2 (in .NET 4.0 / VS2010).

Marc

My guess is that the answer is "no." The Entity Framework isn't necessarily meant to map 1-1 to the database, it's actually supposed to be a business object representation of how you want to use data stored in the database. Therefore it would be very, very difficult to write something that created a database from your Entity Model since you can't expect things to be mapped back to the database on a 1-1 level.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM