views:

33

answers:

1

VS.net 2010/.net 4.0 RC was just released. For those who have used Beta or even the RC how easy/difficult is it to upgrade from entity framework 1.0 to 4.0?

Some things I'm wondering about:

  1. EF1 didn't support foreign keys in the model. I read that EF4 does. I guess if we want to use foreign keys there will be code changes to make?
  2. Upgrading edmx file to 4.0. Does it upgrade automatically or will we need to create a new one? Does it de-pluralize names if it upgrades?
  3. Changes to how lazy loading is handled?
  4. I read somewhere that the connection string has changed?
+2  A: 
  1. EF1 didn't support foreign keys in the model. I read that EF4 does. I guess if we want to use foreign keys there will be code changes to make?

Yes. FK associations are the default in new models. But existing models have to be manually changed if you want to use them.

  1. Upgrading edmx file to 4.0. Does it upgrade automatically or will we need to create a new one?

It "just worked" for me as-is.

Does it de-pluralize names if it upgrades?

No. It pluralizes new objects when you update a model, though.

  1. Changes to how lazy loading is handled?

Well, insofar as there was no lazy loading in EF 1 and there is in 4, yes.

  1. I read somewhere that the connection string has changed?

Not that I've noticed. Certainly, existing projects seem to just work without changing it.

Craig Stuntz