Share via


EF 4.1 Update 1 Released

 


The information in this post is out of date.

Visit msdn.com/data/ef for the latest information on current and past releases of EF.


 

Back in April we announced the release of Entity Framework 4.1 (EF 4.1), today we are releasing Entity Framework 4.1 – Update 1. This is a refresh of the EF 4.1 release that includes a small number of bug fixes and some new types to support the upcoming migrations preview.

What’s in Update 1?

Update 1 includes a small set of changes including:

  • Bug fix to remove the need to specify ‘Persist Security Info=True’ in the connection string when using SQL authentication. In the EF 4.1 release ‘Persist Security Info’ was required for Code First to be able to create a database for a connection using SQL Authentication. The update includes a fix to remove this requirement. Note that ‘Persist Security Info’ is still required if you construct a DbContext using a DbConnection instance that has already been opened and closed.
  • Introduction of new types to facilitate design-time tools for Code First. Update 1 introduces a set of types to make it easier for design time tools to interact with derived DbContexts:
    • DbContextInfo can be used to instantiate and interact with a derived context as well as determine information about the origin of the connection string etc..
    • IDbContextFactory<TContext> is used to let DbContextInfo know how to construct derived DbContext types that do not expose a default constructor. If your context does not expose a default constructor then an implementation if IDbContextFactory should be included in the same assembly as your derived context type.

 

How Do I Get Update 1?

Entity Framework 4.1 – Update 1 is available in a couple of places:

  • Download the stand alone installer
    Note: This is a complete install of EF 4.1 and does not require a previous installation of the original EF 4.1 RTM.
  • Add or upgrade the ‘EntityFramework’ NuGet package
    Note: If you have previously run the EF 4.1 stand alone installer you will need to upgrade or remove the installation before using the updated NuGet package. This is because the installer will add the EF 4.1 assembly to the Global Assembly Cache (GAC). When available the GAC’d version of the assembly will be used at runtime.
    Note: The NuGet package only includes the EF 4.1 runtime and does not include the Visual Studio item templates for using DbContext with Model First and Database First development.

 

Getting Started with EF 4.1

There are a number of resources to help you get started with EF 4.1:

 

Support

This release can be used in a live operating environment subject to the terms in the License Terms. The ADO.NET Entity Framework Forum can be used for questions relating to this release.

 

ADO.NET Entity Framework Team

Comments

  • Anonymous
    July 25, 2011
    When will the release be ready with the SQL improvements? This update provides zero benefit to us. The SQL generation of EF is rediculously slow at the moment and the June 2011 CTP fixes the majority of our performance problem, but we can't put a CTP into a production environment.

  • Anonymous
    July 25, 2011
    The comment has been removed

  • Anonymous
    July 25, 2011
    How does it create the database and then reconnect to the new database without persisting the security info? [)amien

  • Anonymous
    July 25, 2011
    Ah, probably now uses the "USE [database]" command - that was not supported on Azure when we developed CF originally. [)amien

  • Anonymous
    July 25, 2011
    @Damien: we found that in the majority of cases it was our own code which was actually creating the connection objects based on an user provided connection string (e.g. from the .config file). In this update we just make sure that we create a separate connection object for things like database initialization. Then because the connection object has never gone through an Open()/Close() cycle before, the credentials will still be there as needed.

  • Anonymous
    July 25, 2011
    @Damien: we found that in the majority of cases it was our own code which was actually creating the connection objects based on an user provided connection string (e.g. from the .config file). In this update we just make sure that we create a separate connection object for things like database initialization. Then because the connection object has never gone through an Open()/Close() cycle before, the credentials will still be there as needed.

  • Anonymous
    July 25, 2011
    @Daniel and @Kim: Thanks for your questions. This is just a minor update to EF 4.1, which still builds on top of the core EF 4.0 bits (e.g. System.Data.Entity.dll, which is part of .NET 4.0). The upcoming EF Migrations preview will work with this version, but the rest of the vNext features like enums, spatial and TVF support, query plan caching for LINQ and the SQL generation improvements you refer to require changes to the core EF bits and will take longer to release. Unfortunately I don’t have any specific dates that I can share at the moment.

  • Anonymous
    July 25, 2011
    Why are these packages never distributed in ZIP (or other archive) format for easy extraction? The typical use case in my workplace is to have to install the package, locate and copy the relevant DLLs, and then uninstall again. A simple ZIP with the DLLs would save a lot of hassle :-)

  • Anonymous
    July 25, 2011
    Hello, is there in this update any way to create unique keys with CF?

  • Anonymous
    July 25, 2011
    The comment has been removed

  • Anonymous
    July 26, 2011
    Germán, we're not sure what could be causing this, but it might be related to the ADO.NET provider you're using. What database are you targeting, and what provider are you using? Thanks, David

  • Anonymous
    July 26, 2011
    When are Data Migrations coming? Please say soon.

  • Anonymous
    July 26, 2011
    @Juan Francisco: No, unique constraints are still not supported in EF.

  • Anonymous
    July 26, 2011
    @Juan Francisco: No, unique constraints are still not supported in EF.

  • Anonymous
    July 26, 2011
    Dear ADO.NET team, In one of out project we would like to use Entity Framework.Before using we want to know the  limitations. Can you please answer below questions? *Maximum how many tables it support.(If we import tables to Entity framework designer) *Do i need to create more than one entity model if i have more than 300 tables *How it support if my result set is dynamic Hope i will get replay soon from you . Thanks, Srinivasa Rao.K

  • Anonymous
    July 27, 2011
    Why does Microsoft call some things Service Packs and other things just use version updates?  And now we have "Update 1"?  Why isn't this just called 4.1.1 or some such?

  • Anonymous
    July 27, 2011
    your product versioninig confuses me

  • Anonymous
    July 27, 2011
    I agree this is confusing - this has new public API, why isn't this just 4.2?

  • Anonymous
    July 28, 2011
    The comment has been removed

  • Anonymous
    July 28, 2011
    "@John/avc/Paul, duly noted. I think we could learn a lot from semantic versioning.  It takes time to change course, however, so keep speaking up - there's still hope for us! :)" What does that even mean? There is nothing to learn and you can start doing it today.

  • Anonymous
    July 28, 2011
    The comment has been removed

  • Anonymous
    July 28, 2011
    The requirements for Update 1 are: Windows 7, Windows Server 2003, Windows Server 2008, Windows Server 2008 R2, Windows Vista No more XP support or did you just forget to list it? :)

  • Anonymous
    July 29, 2011
    I could really use an update that officially includes support for the compiled queries. I tried the June 2011 CTP, but it did not work for me because it did not properly support the MySQL connector. Given how slow Entity Framework is at generating SQL, it is critical this release gets out at some point in the near future. I performance benchmarked Entity Framework against raw ADO.NET (our original code), Open Access ORM and Entity Framework. Open Access was 4-5x slower than direct ADO.NET code. Entity Framework was another 4-5x slower again than Open Access, making it about 20x slower than ADO.NET code. Until these kinds of performance issues are resolved, Entity Framework is really just an interesting experiment.

  • Anonymous
    July 30, 2011
    The comment has been removed

  • Anonymous
    September 22, 2011
    When will we be able to rename the Discriminator column? I have abandoned EF Code First as it does not let me specify such schema details. I don't tolerate having no control over all of my table field names! stackoverflow.com/.../cannot-rename-discriminator-column-in-entity-framework-4-1-code-first-database

  • Anonymous
    September 30, 2011
    This question has some overlap with RIA services but I assume it's more dependent on EF than on RIA. When I add an item to a collection property of an object, the context won't trigger an update. Is this normal? More details here: stackoverflow.com/.../ria-ef-4-1-wont-update-object-if-i-add-item-to-collection-property

  • Anonymous
    August 15, 2012
    Hi Is this version of EF compatible with Visual Web Developer 2010 Express Edition with Mysql Database ? Thanks.

  • Anonymous
    August 16, 2012
    The comment has been removed