This page provides a roadmap for Entity Framework. This is a planning document, not a specification of what is to come. We hope to implement most or all of the features listed here, but there are no guarantees. Plans can change. You can help change them! Please visit the Entity Framework UserVoice site to provide feedback on our plans so that we have a better picture of what you want to see in the next release.

Entity Framework 6

EF6 will be the next major release of Entity Framework. The open source repository will be used to ship EF6 and future releases.

Here are the major features that we plan to include in the EF6 release. For more details on these features, and other smaller features that we introduce, see the Feature Specifications page.

  • Async Query and Save - Supports the task-based asynchronous patterns that were introduced in .NET 4.5.
  • Custom Code First Conventions - Allows writing custom conventions for Code First to help avoid repetitive configuration.
  • Code First Mapping to Insert/Update/Delete Stored Procedures – Enables mapping to stored procs for insert, update and delete operations using the Code First APIs.
  • Connection Resiliency – Allows database operations to be re-tried if the connection is lost.
  • Dependency Resolution - Supports the Service Locator pattern including factoring out some pieces of EF functionality that can be replaced with custom implementations.
  • Code-Based Configuration - Configuration has traditionally been specified in a config file, EF6 will give you the option of performing configuration in code.
  • Configurable Migrations History Table - Some database providers require the appropriate data types etc. to be specified for the Migrations History table to work correctly.
  • Multiple Contexts per Database - In previous versions of EF you were limited to one Code First model per database when using Migrations, this limitation will be removed in EF6. 
  • Tooling Consolidation – Combining the EF Power Tools and the EF Designer to provide a single set of tooling with a single wizard for creating new models.
  • 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.

Entity Framework 5

The EF5 release is available on NuGet and introduces the following new features:

  • Enum support allows you to have enum properties in your entity classes. This new feature is available for Model, Database and Code First.
  • Table-valued functions in your database can now be used with Database First.
  • Spatial data types can now be exposed in your model using the DbGeography and DbGeometry types. Spatial data is supported in Model, Database and Code First.
  • A number of performance enhancements.

The following new features are also available in the Entity Framework Designer in Visual Studio 2012:

  • Multiple-diagrams per model allows you to have several diagrams that visualize subsections of your overall model.
  • Batch import of stored procedures allows multiple stored procedures to be added to the model during model creation.

Last edited Feb 27 at 8:45 PM by RoMiller, version 23

Comments

niico Tue at 8:38 PM 
+1 for 'Unique constraints/alternate/natural keys' - [Unique] data annotation on models please!

RoMiller Mar 12 at 6:54 PM 
@Dmitri_Lipski - That is one of the scenarios we are going to enable as part of the 'lifecycle hooks' feature http://entityframework.codeplex.com/workitem/872 . Unfortunately that's not going to fit into EF6 though.

Dmitri_Lipski Mar 12 at 12:27 PM 
When are we going to get SQL Query Logger like on LinqToSql Log property on DataContext? I really missing that future from LinqToSql. Because I was able to output straight to my web page all my queries with they execution times. It really helped to see if generated query was done optimal way.

neoland Dec 6, 2012 at 8:37 AM 
Entity Framework does not support OFFSET FETCH keyword for paging. I'm looking forward this property.

neoland Dec 6, 2012 at 8:33 AM 
ww

Brendalfly Nov 16, 2012 at 8:01 AM 
+1 for 'Unique constraints/alternate/natural keys'

Especially useful when working with legacy databases.

Geminiman Oct 19, 2012 at 9:46 PM 
When can we expect Table Valued Functions in Code First? How about Scalar Functions?

AndriySvyryd Oct 4, 2012 at 11:26 PM 
@benjaminjnr2k11: Check out the discussion on this topic at http://entityframework.codeplex.com/discussions/376901

@HClausing: Currently we don't plan to make Async work with Lazy Loading or WPF data binding.

benjaminjnr2k11 Oct 3, 2012 at 7:19 PM 
My point above about batching speaks to andreir's comment and I think Mojtaba_kaviani's API will make that possible so that for instance:
context.Orders.Delete(o => o.State == OrderState.Rejected)

will get rid of all rejected orders in one fell swoop instead of having to materialize the objects, traverse the list, mark them deleted and SaveChanges where EF now spits out one SQL query per object and does some "unnecessary" house cleaning.

This particular batching can go a step further to support the MERGE statement in the ANSI SQL Standard; this will be a killer feature that takes care of many of our woes and trumps all other ORMs.

benjaminjnr2k11 Oct 3, 2012 at 7:08 PM 
I agree with Mojtaba_kaviani on having Update and Delete stubs on the entity sets that implicitly translate to the corresponding SQL CRUD operations.

I will also request supporting CTE's (Common Table Expressions).

Batch updates are also very key for performance reasons. Instead of submitting Deletes and Updates one after the other, why not batch them up; or keep the old semantics but provide different API methods that are built specifically for batching. Without this, we'll still need to maintain utility SPs that do a lot of heavy lifting. That kind of defeats databases agnosticity (I hope that's right).

mzaidipk Sep 13, 2012 at 5:44 PM 
Can we expect to have a Linq to Entity Visualizer as a plugin for VS. and is there a way to have multiple connection strings defined for a single model, for example some of the tables in the model maybe confidential and we may want to secure those tables to use the connectionstring which would have readonly rights on those tables but are part of the same model / schema how can we achieve this and if the current release does not support it can we expect it in future release.

HClausing Sep 12, 2012 at 12:53 PM 
Could we use Await and Async on ICollection of related classes in Code-First? The ideia is to use Lazy Loading Async with WPF Binding.

ojbilly Aug 30, 2012 at 5:42 PM 
im still on linq2sql when code first can work with stored procedures or when I can map stored procedures as easy as it in in linq2sql and when async is added then I'l be fully on entityframework

micklang Aug 23, 2012 at 4:27 AM 
Entity Framework currently steers people down a path in which the majority of code is written against Entity Framework primitive class types.

This is not a very good architecture.

Entities generated by the framework are tightly coupled against a specific database with a specific schema and consequently all code referencing those entities become tightly coupled to that same database and schema.

It would be far better if you could code against interfaces for entities. It would allow code to be reused between schemas (presuming that the schemas contain subsets of each other). E.g. You may have a User, a User Roles and Location table in a Asset management system, and the same tables in a HR system, but you don't want to couple the HR and Asset management schemas to each other.

ahmedhse Aug 7, 2012 at 11:49 AM 
Mappling multi-result-sets per single stored procedure is a must. It has to be added.
Creating custom (in directly mapped) entities is also a must (e.g. entities that are populated from stored procedures and not directly mapped to a table or view)

doogie04 Jul 26, 2012 at 1:43 PM 
A few issues I work around on a regular basis: Multiple results, caching, HierarchyID

*MULTIPLE RESULT SETS*
Support multiple results sets in EF. I know the EDMX supports it as of 5, but get support into the code or designer. In my perfect world I would be able to do two things. First, , I would be able to use a single stored proc for Multiple result sets. Second I would be able to create ad-hoc bundles with code something like
myEF.Bundle ( db => {
widgetList = db.Widgets.Find(x=>x.Price < 50).ToList(),
cogList = db.Cog.All().ToList()
}

The above syntax would simply bind together two EF sql strings into a single round trip. Stylistically , I think it would feel a lot like how SquishIt or CSS Bundling work, i.e. 'this is what i want done in a single batch'.


**CACHING**
I'm glad to see that EF 5 is saving complied queries. Building on that success, it would be nice to have two natural caching plugins for L1 & L2 caching. In process, non-cloned, read-only caching would be great, particularly with the ability to cache the results as a dictionary for fast lookups. This would be great for all the lookup/slow moving data that abounds. Second, a read through location for L2 / AppFabric/out of process caching. For both layers it would be nice to have the ability to use the SQL Notifications framework.


**HierarchyID**
Not sure what to write here, other than please please please. I know EF is provider agnostic, but we now have support for the spatial data types. Please tack HierarchyID on that list -- it such a great way to represents, well, hierarchies...it's such a waste to have to convert it to a string and all that entails.

rwttm001 Jul 24, 2012 at 9:28 AM 
RoMiller - thanks for this and for the work towards the new release, voted up.

RoMiller Jul 23, 2012 at 5:16 PM 
@rwttm001 - You can track and vote for that feature here - http://entityframework.codeplex.com/workitem/299

RoMiller Jul 23, 2012 at 5:15 PM 
@oroshy - If you're mapping to an existing database you can just tell Code First your view is a table and everything will work. If you are creating a database then Code First Migrations will generate a CreateTable call but you can replace it with a Sql call to create the view.

Feel free to add a feature request for more native view support.

rwttm001 Jul 23, 2012 at 1:29 PM 
Unique constraints/alternate/natural keys please!

oroshy Jul 20, 2012 at 7:28 PM 
Sql's View on CodeFirst.
Please.

AndrewPeters Jul 20, 2012 at 5:29 PM 
Thanks guys. Feel free to create new/vote existing issues where appropriate and also start threads in the Discussions tab.

RoMiller Jul 20, 2012 at 4:50 PM 
@Grauenwolf - You can use private property setters with EF today. We also have this work item to allow you to configure how data is read and written to objects - http://entityframework.codeplex.com/workitem/93. Please add your vote to the feature.

RoMiller Jul 20, 2012 at 4:48 PM 
The discussion about batch delete/update has moved to this discussion thread - http://entityframework.codeplex.com/discussions/376901

andreir Jul 20, 2012 at 10:15 AM 
Like others, I am disappointed that not even in the 6th version's roadmap there is no plan for batch update and delete. If I need to delete all the rows that have Expired==true in a table I need to do it in one operation not in "n".

anilmujagic Jul 20, 2012 at 1:41 AM 
+1 for Update and Delete Query with LINQ

JRodman Jul 20, 2012 at 1:17 AM 
What about support for Enums backed by a text field in the database? Only being able store them as a number defeats the purpose in my mind. I guess I still have to resort to my hidden property hack to get it to work.

Grauenwolf Jul 20, 2012 at 12:34 AM 
What about immutable object support? Instead of marking every property public I would rather have the option to expose a constructor that EF uses. Maybe something like this:

[ObjectConstructor]
public MyReadonlyClass( IDictionary data )

Or just allow EF to use reflection to call private property setters.

compupc1 Jul 19, 2012 at 5:25 PM 
Very cool!!!! Mojtaba -- I fully agree. I think your idea is a specific case of a more general ability to issue updates, inserts, and deletes without requiring the use of the change tracking mechanism (e.g. not following or changing navigation properties). See http://data.uservoice.com/forums/72025-entity-framework-feature-suggestions/suggestions/1852563-simple-static-delete-and-update-methods

Mojtaba_kaviani Jul 19, 2012 at 4:38 PM 
i suggest add Update and Delete Query with linq to EF6
ex: context.Products.Update(p=> p.Id == 1,p=> p.Amount = 12000)
ex: context.Orders.Delete(o=>o.ProductId == 1)