Acchhh… the type ‘System.Data.EntityState’ is defined in an assembly that is not referenced…

This was a complete googlewhack; when I entered the complete text, I got exactly one response! BTW, when I try now I am up to three, so there are obviously at least two more people with the same challenges that I have…

 

So, you look up the generic advice and they say a variation on the below;

Update web.config to read "<add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />"

All very exciting, but the key bit of information that we're missing is that adding the EntityFramework DLL / namespace does not complete the picture.

Make sure you add the .Net library "System.Data.Entity" and all will [...]

RC of Entity Framework 4.1 (including EF Code First) is released

Scott Guthrie announced on his blog that the Release Candidate of the excellent Entity Framework 4.1 is now available. See here for all the gen.

 

He has also updated the "NerdDinner" sample project to use the new EF4.1 features, especially the "Code First" pattern where you can create lovely, clean POCO models and have them automatically create the database schema, update the schema and handle the repository actions.

It's a fantastic post and goes a long way to explaining the topics. However, given the bleeding-edge of this technology, there are a couple of differences between Scott's code and the RC code that you can get from here.

New names for IDatabaseInitializer conventions

Scott's code shows the following to persuade (in debug code) how to recreate [...]