Along with Soma and others, the ADO.NET team has announced that the next beta of Entity Framework is available with the VS2008 Service Pack 1 BETA bits. The Astoria team already has a list of changes on their blog and there will be one coming for EF as well.
In the meantime….
Never a dull moment. I have two EF sessions this week at DevTeach and have to very quikly overhaul my demos.
Here are some of my notes.
EDMX Changes
Designer section
<edmx:ReverseEngineer /> has to be removed. I guess it was hopeful thinking.
SSDL
New attribute required inside of schema (Provider=”System.Data.SqlClient”)
These attributes had to be removed: DateTimeKind=”Unspecified” PreserveSeconds=”true”
ProviderManifestToken Attribute in schema declaration needs to be changed from the version number (eg for SS2005 that was ProviderManifestToken=.09.00.3054 now is ProviderManifestToken=2005.
Designer section is now at the bottom of the file. Nice.
You cannot have both the Design view and the XML view of an EDMX open at the same time.
In the Model Browser window, the XML for various pieces of the model are no longer shown in the tool tips. While there are reasons behind this, I REALLY liked this and am sad to see it go. Now I have to always close the designer and open up the XML and trudge through it if I just want to verify something. Oh well.
Designer Changes
Oh my its pretty! It’s cleaned up; the Asscoiation names are no longer clogging up the view, it’s more flexible wrt to what’s available on context menus and it has some nice shortcut icons for zooming etc.
Update from Model
As per a blog post from Noam Ben-Ami a while ago, this has improved enormously. With some minor excpetions (which I have not experienced) the CSDL stays intact when you update even though teh SSDL will be competely rewritten so any changes there will be lost. If you add new fields to a table in the database, and it’s obvious in the model where it should go, it will make it into the CSDL.
Code Generated Classes
Best bet: just delete them and let VS2008 regenerate them.
API Changes that I’ve experienced so far
It is very nice to have full graphs coming in and out of WCF services. 🙂
Believe it or not, I haven’t run into anything else so far that has impacted my apps except for the fact that I need to completely rearchitect my WCF solutions now that I have graphs to pass back and forth. Will I get this done before my session on using Entity Framework across tiers on Wednesday? Nothing like being forever behind the 8-ball. 🙂
The EntityDataSource control
I am not a big fan of drag & drop, but I’m liking this control so far. Here are some of the things that are winning me over.
Easily use inherited types
Easily do eager loading with the IncludePaths property.
Note: There’s a bug which is preventing the combination of eager loading when you are using an inherited types. That will go away with the next available build.Many opportunities to override behavior. There are lots of events and the most important to me (so far) is the one lets me control what context the control will be tied to. By default, every EntityDataSource spins up its own context. That’s not good if you want to have relationship management happening.
Dynamically build queries with the properties or just entier an EntitySQL string as the command text.
Note that the where parameter takes an Entity SQL predicate, just like you would use with Query Builder methods.
That’s all for now.
Have fun!
Sign up for my newsletter so you don't miss my conference & Pluralsight course announcements!
Great to finally be able to test the EntityDataSource. However, I was shocked to find out I no longer can access the bound dataobject in e.Row.DataItem of a gridviews RowDataBound event. It worked fine with the ObjectDataSource, but the EntityDatasource prevents this. Why the change?
Just a note when converting EDMX files. Default values specified in the CSDL need to change from Default="SomeValue" to DefaultValue="SomeValue".
Erlend,There are some interesting details to why you cannot access the object directly in this version of the EntityDataSource. Please, take a look at this post for a solution:http://blogs.msdn.com/diego/archive/2008/05/13/entitydatasource-to-wrap-or-not-to-wrap.aspx