1、依據MSDN的官方描述:
In previous versions of EF the code was split between core libraries (primarily System.Data.Entity.dll) shipped as part of the .NET Framework and out-of-band (OOB) libraries (primarily EntityFramework.dll) shipped in a NuGet package. EF6 takes the code from the core libraries and incorporates it into the OOB libraries. This was necessary in order to allow EF to be made open source. The consequence of this is that applications will need to be rebuilt against the moved types.
This should be straightforward for applications that make use of DbContext as shipped in EF 4.1 and later. A little more work is required for applications that make use of ObjectContext but it still isn’t hard to do.
在之前的EF版本中,代碼被分割為主要的庫(System.Data.Entity.dll)--作為.NET Framework的一部分載入,以及外圍的庫(主要就是 EntityFramework.dll)--作為NuGet載入。
EF6將代碼從核心庫去除,然后將其合並到外圍庫中。這是必須的,因為這樣可以使EF成為open source。這么做的后果就是應用必須根據移除的類型做重新的生成。
這一點對於在EF4.1或其后的版本中使用DbContext的應用來說是沒問題的。而使用ObjectContext的應用還需要做一點並不難的工作。
2、EF 4.1.10031.0(自己機器上的版本)添加實體數據模型時,默認生成的是ObjectContext。
而升級到EF5和EF6時,則默認生成的是DbContext。雖然兩種數據庫映射模型可以互轉。但在更新的版本中官方推薦DbContext。