Introducing the ADO.NET Entity Framework

For those of you who subscribe to VSJ, UK software journal, this month in the May edition hopefully you read my Introduction Entity Framework article. It is a huge framework and the aim of my article was to demystify some of the terms and how they all link together, I feel it archives this aim.

For those of you who don’t subscribe, you can find the article online at

Technorati Tags:

Entity Framework Tools – Refreshing model with schema changes

image One of the main problems with Linq to SQL was the fact that you couldn’t easily refresh your diagram to take into account schema changes.

I was really pleased to see that in the Entity Framework tools they have the ability to update model from database.  Simply right click the NorthwindModel.Store in the Model Browser and click the option to update.

You then have the ability to Add, Update or Delete items from your model.


However, not all is same it seems….

I created a model with all the tables from my database. I then later went back and removed all the entities apart from Customer, Order and Order_Details. After selecting to update my model, I unticked the Add checkbox as I didn’t want anything being added.  I then wanted to uncheck the other tables which I wasn’t interested in but got the error “Items for update and delete cannot be checked or unchecked”, this was a bit odd but fair enough.

So I clicked finish and it added all of the removed entities back into my model!  Not what I expected to happen at all.

To make matters worse, the column I dropped was still in my table! I tried to add a column and that didn’t appear either until I deleted and re-added the table.

Anyone have any ideas on the expected behaviour of this feature??

Entity Framework – New model wizard closes when generating from database

Tonight I was taking an in-depth look at the Entity Framework bits.  After creating my C# console application, I went to add the new ADO.NET Entity Data Model. After adding the item, I selected that the model should contain objects generated from database.  After clicking next, the dialog closes – not great!

Next step was to generate the model manually, however this also gave me a type initialise exception,  finally after closing VS2008 it crashed and gave Vista’s lovely error reporting messages.

The solution was a quick reinstall of the Entity Framework Tools CTP 2 soon shorted it out, it either didn’t install correctly or I didn’t install it (which is strange as I had the templates installed inside VS). 

ADO.NET Entity Framework Beta 2 & August Tools CTP

Mike Taulty has been busy and just posted loads of information on the ADO.Net Entity Framework (One of the joys of working for Microsoft – early access!). Really recommend you head over to his blog and check it out.

To get started, the following links are useful. 




Getting Started Video

I haven’t had chance to look into this yet so expect more posts over the next few days and weeks.

Technorati Tags: