Partager via


EF6 Alpha 1 Available on NuGet

 


The information in this post is out of date.

EF6 RTM is now available.

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


 

EF6 Alpha 1 Available on NuGet

A couple of months ago we released the RTM of EF5. Today we are pleased to announce the first alpha of EF6. EF6 is being developed in an open source code base on CodePlex, see our open source announcement for more details.

 

We Want Your Feedback

You can help us make EF6 a great release by providing feedback and suggestions. You can provide feedback by commenting on the feature specifications or starting a discussion on our CodePlex site.

 

Support

This is a preview of features that will be available in future releases and is designed to allow you to provide feedback on the design of these features. It is not intended or licensed for use in production.

If you need assistance using the new features, please post questions on Stack Overflow using the entity-framework tag.

 

Getting Started with Alpha 1

The Get It page provides instructions for installing the latest pre-release version of Entity Framework.

Note: In some cases you may need to update your EF5 code to work with EF6. See Updating Applications to use EF6 for more details.

Note: Alpha 1 is a very early preview of EF6. The APIs and functionality included in Alpha 1 are likely to change significantly prior to the final release of EF6.

EF6 Alpha includes the following new features and changes.

  • Async Query and Save - EF6 now supports the task-based asynchronous patterns that were introduced in .NET 4.5. We've put together a walkthrough that demonstrates this new feature. You can also view the feature specification on our CodePlex site for more detailed information.
  • Custom Code First Conventions - You can now write custom conventions for Code First to help avoid repetitive configuration. We provide a simple API for lightweight conventions as well as some more complex building blocks to allow you to author more complicated conventions. There is a walkthough that covers both of these options and a feature specification on our CodePlex site.
  • Multiple Contexts per Database (Formerly known as 'Multi-Tenant Migrations') - In previous versions of EF you were limited to one Code First model per database when using Migrations or when Code First automatically created the database for you, this limitation is now removed. If you want to know more about how we enabled this, check out the feature specification on CodePlex.
  • Configurable Migrations History Table - Some database providers require the appropriate data types etc. to be specified for the Migrations History table to work correctly. The feature specification provides details about how to do this in EF6.
  • Code-Based Configuration - Configuration has traditionally been specified in a config file, EF6 also gives you the option of performing configuration in code. We've put together an overview with some examples and there is a feature specification with more details.
  • Dependency Resolution - EF now supports the Service Locator pattern and we've factored out some pieces of functionality that can be replaced with custom implementations. The feature specification provides details about this pattern, and we've put together a list of services that can be injected.
  • Updated Provider Model - In previous versions of EF some of the core components were a part of the .NET Framework. In EF6 we've moved all these components into our NuGet package, allowing us to develop and deliver more features in a shorter time frame. This move required some changes to our provider model. We've created a document that details the changes required by providers to support EF6, and provided a list of providers that we are aware of with EF6 support.
  • Enums, Spatial and Better Performance on .NET 4.0 - By moving the core components that used to be in the .NET Framework into the EF NuGet package we are now able to offer enum support, spatial data types and the performance improvements from EF5 on .NET 4.0.

 

What's after Alpha 1

If you want to try out the changes we've made since the last official pre-release, you can use the latest signed nightly build. You can also check out the Feature Specifications page on CodePlex for more information about new features that we are working on. You can also read our Design Meeting Notes to keep track of the evolving design of new features.

Comments

  • Anonymous
    October 31, 2012
    According to the roadmap (entityframework.codeplex.com/wikipage), "Stored Procedures & Functions in Code First" was possibly going to be part of EF6 - is that still coming after Alpha 1 or has that been postponed?  I would love this feature   =)

  • Anonymous
    October 31, 2012
    @David McClelland It's still planned to be done in EF6. Some of the metadata prerequisites are already being worked on and when they are done we should have someone start on it.

  • Anonymous
    October 31, 2012
    Please I need a rough date on when TVF and SPROC support for code first will be available in EF. Thank you.

  • Anonymous
    October 31, 2012
    Nice job. There any estimate about a Go-Live version release date? Thanks.

  • Anonymous
    November 01, 2012
    ok, so because of the provider chanegs Firebird won't work. I'll wait for the official Beta of EF6 and hope that Firebird works.

  • Anonymous
    November 02, 2012
    Any word on whether there are plans to improve batch/insert/update performance anytime soon?

  • Anonymous
    November 02, 2012
    @Khaled These are still planned for EF6. @Márcio Rezende and @Khaled We don't have a release date for EF6 yet, but tentative plans are for sometime next year. That may change based on a lot of factors. @Andre.Ziegler Jiri Cincura ‏(@cincura_net on Twitter) is working on a Firebird provider. @Jon Some people in the community have started working on this and are working with the EF team on the approach/design. Checkout this discussion on CodePlex entityframework.codeplex.com/.../377636

  • Anonymous
    November 04, 2012
    I'd like to know if there are any improvements concerning the really bad performance of the .Contains() operator? See stackoverflow.com/questions/7897630/why-does-the-contains-operator-degrade-entity-frameworks-performance-so-drama With stackoverflow.com/.../7936350 noting: "EF's provider model doesn't currently include an expression that represents an IN clause, therefore ADO.NET providers can't support IN natively. Instead, the implementation of Enumerable.Contains translates it to a tree of OR expressions... ...When we added support for Enumerable.Contains in EF4, we thought it was desirable to do it without having to introduce support for IN expressions in the provider model, and honestly, 10,000 is much more than the number of elements we anticipated customers would pass to Enumerable.Contains. That said, I understand that this is an annoyance and that the manipulation of expressions trees makes things too expensive in your particular scenario."

  • Anonymous
    November 04, 2012
    Some addition to previous comment - I just found the issue tracked here: entityframework.codeplex.com/workitem/245 Seems nothing has changed in a year which is really annoying when perfomance drops from 0.x to multiple seconds. When stressing the importance of performance please do not just look at some new async features but keep this other category of real world performance problems in mind.

  • Anonymous
    November 04, 2012
    Link: entityframework.codeplex.com/.../245

  • Anonymous
    November 05, 2012
    Any alternative to code-conventions meanwhile?

  • Anonymous
    November 06, 2012
    @Tom We've been brainstorming different ways to address Contains so it's definitely on our radar and we will try to get a change made for EF6, but I can't say for sure that it will make it. @Shimmy I'm not sure what you're referring to; can you be more specific?

  • Anonymous
    November 07, 2012
    Still should stay on NHibernate until will be possible to save serialized custom type in db.

  • Anonymous
    November 28, 2012
    Enums in dotnet 4.0 Thank you so much this is great news. Now I can stick to vs2010/dotnet 4.0  and still have enum support. Believe it or not this was the one thing that was making me consider vs2012.

  • Anonymous
    December 11, 2012
    @Tom & all, The performance improvement for Enumerable.Contains made it in for EF6 alpha 2. Playing with it in my machine I have found that the translation of a LINQ query with list.Contains(x) on a list that contains 100,000 int elements now takes less than a second. Hope this helps. You can read more about alpha 2 at blogs.msdn.com/.../ef6-alpha-2-available-on-nuget.aspx.

  • Anonymous
    January 08, 2013
    Any plans to allow text enum (enum description) instead of only integers. Thanks

  • Anonymous
    January 10, 2013
    @George We are considering this as a specific case of type conversions which is something that we unfortunately can't fit into the schedule for EF6. I encourage you to vote for this item on the EF user voice site: data.uservoice.com/.../2639292-support-for-simple-type-mapping-or-mapped-type-con Thanks, Arthur