Posted By: Jonathan Carter | Apr 8th @ 4:05 PM | 58,823 Views | 17 Comments

In this episode of 10-4, we introduce a new tooling enhancement coming with Visual Studio 2010 and the Entity Framework 4.0: model-first development. This feature allows you to create your Entity Data Model from scratch and then generate a database from it, as opposed to reverse engineering your EDM from an existing database.

For more 10-4 episodes, be sure to visit:
http://channel9.msdn.com/shows/10-4

Visual Studio Topic Area on Channel 9:
http://channel9.msdn.com/VisualStudio

Visual Studio 2010 CTP VPC:
http://tinyurl.com/GetCTP

10-4! Over and out!

Rating:
0
1
Moemeka
Moemeka
Me
okay, when can we get our hands on this?  The wait has been waaaaay too long for my AADHD to tollerate.  Feed me seymore!  Feed me now!
That is great!  It's nice to see the EF become even more mature.  It would be even better if we had more control over the physical dml is generated, or if we had a choice to output complex-types to separate tables and have them linked via a foreign key to their parent.  If the customer you created had more than one physical address, say a billing and/or shipping, you'd need to modify your database to support this or you could create a second Address complex-type, but this could get very messy, not to mention confusing.

Also, I attempted to use EF that shipped with 3.5 on a database at work and I subsequently went back to LINQ because the EF wizard "forgot" to pull two of my tables from my database.  I attempted to regenerate the model several times with no luck.   These tables were found in the generated files, but were not present to the tool, nor did visual studio recongize them.  I also recieved compiler errors when I attempted to reference them.  I am wondering if anyone else had this problem with bridging tables which facilitate many-to-many relationships.
stevo_
stevo_
Human after all
Note that the database connection wizard was the one who created the database, not specifically the generate database wizard from the entity framework. It's likely the wizard will always just generate a script to make you do this yourself..

Also, isn't this entity framework v2? is there anything there regarding POCO models? I know they were suposed to be adding this, I'd much rather create ignorant models with INotifyPropertyChanged and generate a conceptual from them, and generate a database schema from the conceptual model.
vesuvius
vesuvius
The Curious Incident of the Dog in the Night-time
POCO models are added in, check out Pablo Castro's mix video where he says this is forthcoming
Analise
Analise
Main
Very interesting! When can we play with a new ctp? The actual one is too OLD Smiley
No kidding eh?  I know that is why I'm not rushing out to download it, I'd like to try it with the new interface, warts and all.
Moemeka
Moemeka
Me
so are you going to be releasing another CTP or a beta anytime soon?  Its about to be May and all there is out there is as far as news is the same tired old links from October.  I'd love to read some buzz about it at least.  BTW  why isnt the .NET framework ever released before the IDE?  after all they are two totally seperate entities right?  I sont mind command line compilation and notepad coding if thats what ita takes to get my hands on this technology.
PerfectPhase
PerfectPhase
"This is not war, this is pest control!" - Dalek to Cyberman

As long I you fix simple things like being able to do model.DeleteCustomers (c => c.Surname == "Smith") i'll be happy.
foreachdev
foreachdev
Twitter: @foreachdev

Features that need to be there:
-Change scripts as well as create scripts (looks like this is already there?)
-Sized fields like Varchar need to have some way to map back field. In fact if you could constrain the field as an EF field during any save operation that would be better. I am talking zero custom code. I set String field with Length 20 in the tooling. It throws an exception on 21+ characters.

Microsoft Communities