Entity Framework Feature Suggestions

Welcome! You can use this site to tell the Entity Framework team what features you want to see in future versions.

Remember that this site is only for feature suggestions and ideas!

If you have technical questions or need help with EF try StackOverflow or visit our forums.

If you want to report a bug you found in EF use the Entity Framework project page on CodePlex.

If you want to find more information about the Entity Framework go to our MSDN site.

Entity Framework Feature Suggestions

You've used all your votes and won't be able to post a new idea, but you can still search and comment on existing ideas.

There are two ways to get more votes:

  • When an admin closes an idea you've voted on, you'll get your votes back from that idea.
  • You can remove your votes from an open idea you support.
  • To see ideas you have already voted on, select the "My feedback" filter and select "My open ideas".
(thinking…)

Enter your idea and we'll search to see if someone has already suggested it.

If a similar idea already exists, you can vote and comment on it.

If it doesn't exist, you can post your idea so others can vote on it.

Enter your idea and we'll search to see if someone has already suggested it.

  1. Interchangeable Backing Database

    I would like to write my code against the EF and have it work with SqlServer Express and SQlServer Compact (or even MySQL and Oracle). It would be great if I could swap these out at runtime, even, pointing to different databases as needed. This would require some improvements to SQLServer Compact, but also some improvements to EF.

    11 votes
    Vote
    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      You have left! (?) (thinking…)
      0 comments  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →
    • Define RelatedProperty on an inherited foreign key

      Allow mapping to entity in a derived class based on a property in base class.

      Normally, we create a [RelatedTo] property for a foreign key defined in the same class.

      But it would be quite handy to be able to define [RelatedTo] on a Foreign Key defined in the base class.

      11 votes
      Vote
      Sign in
      Check!
      (thinking…)
      Reset
      or sign in with
      • facebook
      • google
        Password icon
        I agree to the terms of service
        Signed in as (Sign out)
        You have left! (?) (thinking…)
        0 comments  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →
      • 10 votes
        Vote
        Sign in
        Check!
        (thinking…)
        Reset
        or sign in with
        • facebook
        • google
          Password icon
          I agree to the terms of service
          Signed in as (Sign out)
          You have left! (?) (thinking…)
          0 comments  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →
        • Better auditing interception

          Together will all the fabulous features you are introducing I think it could be find room also for a sort of Audit System more business oriented.
          We love the new Log & Interceptor hooks but we also need to pull out of the DbContext an easy POCO object based on 3 level of entities like this:

          (S)avedChangset (1 instance for every SaveChanges() call with at least Time, User, Application & Session Info)
          (E)ntities (a collection of the Entities changed within the same "Saved Changset" with at least TableName & PK)
          (A)ttributes (a collection of Attributes changed within the same "Entity",…

          10 votes
          Vote
          Sign in
          Check!
          (thinking…)
          Reset
          or sign in with
          • facebook
          • google
            Password icon
            I agree to the terms of service
            Signed in as (Sign out)
            You have left! (?) (thinking…)
            0 comments  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →
          • Option to use Inner Join SQL when Eager Loading (AKA IncludeRequired method)

            When trying to load related entities using the "Include" eager loading feature of EF, it always generates SQL that uses an LEFT OUTER JOIN e.g.

            from m in Customer.Includes("Orders")

            will always generate the SQL:

            SELECT ......
            FROM Customers
            LEFT OUTER JOIN Orders....

            This is not always desirable, especially when you only want to retrieve Customers that have at least one or more related Orders. By forcing the generated SQL to always use LEFT OUTER JOIN, it's going to load all Customers regardless of whether they have related Orders or not. This can become extremely inefficient, especially when there are lots…

            9 votes
            Vote
            Sign in
            Check!
            (thinking…)
            Reset
            or sign in with
            • facebook
            • google
              Password icon
              I agree to the terms of service
              Signed in as (Sign out)
              You have left! (?) (thinking…)
              1 comment  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →
            • Updating the F# SqlEntityConnection Type Provider for EF 6

              The F# SqlEntityConnection Type Provider is a third way to interact with Entity framework (with the other two being an .edmx file and Code First).
              http://msdn.microsoft.com/en-us/library/hh362322.aspx

              This Type Provider doesn't support the updated low-level API changes that EF 6 requires, as far as I can tell. I'd love to have an updated version that supports the async features of EF 6.

              9 votes
              Vote
              Sign in
              Check!
              (thinking…)
              Reset
              or sign in with
              • facebook
              • google
                Password icon
                I agree to the terms of service
                Signed in as (Sign out)
                You have left! (?) (thinking…)
                1 comment  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →
              • let me save expensive intermediate LINQ results in temp table

                LINQ-to-Entities should offer an anaogous operator to AsEnumerable() but instead of materializing results on the client, it would materiailze results on the server (e.g. a temp table for SQL Server), allowing subsequent operators to re-use intermediate results without risking additional server recomputation or requiring a round-trip from client to server.

                The underlying requirement is to make it easier to build and maintain performant LINQ queries that use millions of rows, many complex joins, I/O intensive calculations like running totals or self-joins, or all of the above.

                For these kinds of queries in T-SQL, a good way to get predictable performance…

                8 votes
                Vote
                Sign in
                Check!
                (thinking…)
                Reset
                or sign in with
                • facebook
                • google
                  Password icon
                  I agree to the terms of service
                  Signed in as (Sign out)
                  You have left! (?) (thinking…)
                  0 comments  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →
                • Support Pessimistic Concurrency

                  Allow a Select with UpdLock which locks all returned entities in the Database. This is a basic requirement to program for example a ticket sales portal with entity framework! So far it's not possible and I still have to stick to NHibernate :(

                  8 votes
                  Vote
                  Sign in
                  Check!
                  (thinking…)
                  Reset
                  or sign in with
                  • facebook
                  • google
                    Password icon
                    I agree to the terms of service
                    Signed in as (Sign out)
                    You have left! (?) (thinking…)
                    0 comments  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →
                  • Support ignoring columns with database provided default value

                    If a database defines a default for a column then the column does not need to be mapped to a conceptual schema property anymore. The column is optional (like nullable columns) and the model should validate even if no mapping for the column is defined.

                    8 votes
                    Vote
                    Sign in
                    Check!
                    (thinking…)
                    Reset
                    or sign in with
                    • facebook
                    • google
                      Password icon
                      I agree to the terms of service
                      Signed in as (Sign out)
                      You have left! (?) (thinking…)
                      1 comment  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →
                    • Navigation properties in composite ids without need for the corresponding scaler property

                      If you have a class like

                      public class CustomerAddress
                      {
                      public virtual Customer Customer { get; set; }
                      public virtual Address Address { get; set; }
                      public virtual string AddressType { get; set; }
                      public virtual DateTime ModifiedDate { get; set; }
                      }

                      you should be able to create a composite id like this

                      HasKey(a => new { a.Customer, a.Address });

                      without defining CustomerId and AddressId properties

                      8 votes
                      Vote
                      Sign in
                      Check!
                      (thinking…)
                      Reset
                      or sign in with
                      • facebook
                      • google
                        Password icon
                        I agree to the terms of service
                        Signed in as (Sign out)
                        You have left! (?) (thinking…)
                        0 comments  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →
                      • Self tracking

                        Allow using self tracking in case of "ApplyChanges" to object holding different references (same entitiy loaded from different context or pass using WCF) but actuality they are the same entity (have the same EntityKey) then the entities will be identify by the entity key and not the specific reference.

                        8 votes
                        Vote
                        Sign in
                        Check!
                        (thinking…)
                        Reset
                        or sign in with
                        • facebook
                        • google
                          Password icon
                          I agree to the terms of service
                          Signed in as (Sign out)
                          You have left! (?) (thinking…)
                          0 comments  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →
                        • SqlDependency / query notification

                          in ADO.NET classic thers an option to get a notification from SQL when data changes in the database, using the SqlDependency class for specific queries. i would like to see this supported in the next EF

                          8 votes
                          Vote
                          Sign in
                          Check!
                          (thinking…)
                          Reset
                          or sign in with
                          • facebook
                          • google
                            Password icon
                            I agree to the terms of service
                            Signed in as (Sign out)
                            You have left! (?) (thinking…)
                            0 comments  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →
                          • Allow commit only selected changes

                            There are cases, when we would like to commit only selected changes from changeset. Let's say in complex hierachy ef is not able to resolve all relations and set correct id's, so we would save first parent items, then child items with correct parent id's.

                            7 votes
                            Vote
                            Sign in
                            Check!
                            (thinking…)
                            Reset
                            or sign in with
                            • facebook
                            • google
                              Password icon
                              I agree to the terms of service
                              Signed in as (Sign out)
                              You have left! (?) (thinking…)
                              0 comments  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →
                            • Future Queries

                              I didn´t find any topic about this, but is very important.

                              Its described here: https://github.com/loresoft/EntityFramework.Extended#future-queries

                              // build up queries
                              var q1 = db.Users
                              .Where(t => t.EmailAddress == "one@test.com")
                              .Future();

                              var q2 = db.Tasks
                              .Where(t => t.Summary == "Test")
                              .Future();

                              // this triggers the loading of all the future queries
                              var users = q1.ToList();

                              7 votes
                              Vote
                              Sign in
                              Check!
                              (thinking…)
                              Reset
                              or sign in with
                              • facebook
                              • google
                                Password icon
                                I agree to the terms of service
                                Signed in as (Sign out)
                                You have left! (?) (thinking…)
                                0 comments  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →
                              • Improved API for Migrations

                                The API for DbMigrator is lacking. I would like to see .UpOne(), .DownOne(), .Up(n), .Down(n) methods to attempt to perform that number of migrations.

                                .Update("0") is an odd-looking way to completely thrash the DB. Something like .RollbackAll() would be a very simple implementation and have a much clearer name.

                                Having .Update() take an additional optional parameter to completely rollback first, and apply all migrations from scratch might be very nice, especially in a test or development environment.

                                Generating an SQL script for logging purposes and then performing the DB migration must currently (I believe) be done in two steps. A…

                                7 votes
                                Vote
                                Sign in
                                Check!
                                (thinking…)
                                Reset
                                or sign in with
                                • facebook
                                • google
                                  Password icon
                                  I agree to the terms of service
                                  Signed in as (Sign out)
                                  You have left! (?) (thinking…)
                                  1 comment  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →
                                • Add Support for custom Extension methods

                                  Support extension methods to be defined for entities or generic extensions. As long as the extension returns an IQueryable or expression that only includes supported operations/extensions, then the provider should expand the extension method and replace it in the expression tree with the the returned iqueryable/expression.

                                  Thus for the most part, any extension method encountered in the expression that is not supported, should be called to return an expression that can be inserted into the expression tree. So long as the process operators recursively as it is expanding the expression, eventually the expression tree will consist of supported expressions and…

                                  7 votes
                                  Vote
                                  Sign in
                                  Check!
                                  (thinking…)
                                  Reset
                                  or sign in with
                                  • facebook
                                  • google
                                    Password icon
                                    I agree to the terms of service
                                    Signed in as (Sign out)
                                    You have left! (?) (thinking…)
                                    2 comments  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →
                                  • Allow adding fluent code to each entity, to minimize the mess in the context

                                    There should be a way (perhaps by implementing an interface), to add fluent code separately to each entity instead of adding it all in the OnModelCreating method.
                                    The OnModelCreating base method should call all the entities that implement that interface and call OnModelCreating(context) of it.
                                    In this way the bunch of fluent code in the main context, especially if it's a large one, would tidy up in the individual entities.
                                    Of course, this is already simply doable, but I think this should go out the box.

                                    7 votes
                                    Vote
                                    Sign in
                                    Check!
                                    (thinking…)
                                    Reset
                                    or sign in with
                                    • facebook
                                    • google
                                      Password icon
                                      I agree to the terms of service
                                      Signed in as (Sign out)
                                      You have left! (?) (thinking…)
                                      1 comment  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →
                                    • Support for .Contains(Entity)

                                      Be able to write code like "if (Context.Table.Contains(entity))"

                                      7 votes
                                      Vote
                                      Sign in
                                      Check!
                                      (thinking…)
                                      Reset
                                      or sign in with
                                      • facebook
                                      • google
                                        Password icon
                                        I agree to the terms of service
                                        Signed in as (Sign out)
                                        You have left! (?) (thinking…)
                                        3 comments  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →
                                      • Support for multiple result sets in .ExecuteFunction() and .ExecuteQuery()

                                        public Tuple‹T1, T2› ExecuteQuery‹T1, T2›(string query) { ... }
                                        public Tuple‹T1, T2, T3› ExecuteQuery‹T1, T2, T3›(string query) { ... }

                                        7 votes
                                        Vote
                                        Sign in
                                        Check!
                                        (thinking…)
                                        Reset
                                        or sign in with
                                        • facebook
                                        • google
                                          Password icon
                                          I agree to the terms of service
                                          Signed in as (Sign out)
                                          You have left! (?) (thinking…)
                                          1 comment  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →
                                        • Query serialization / deserialization

                                          ** SUGGESTION **
                                          Native support for query serialization and deserialization (to XML) decoupled from a concrete ObjectContext, including query parametrization and correct management of lambda expressions (e.g. using expression expansion as in LinqKit).

                                          ** WHY **
                                          We've developed a set of classes that allow a query to be written in the client layer and executed in the service layer via web services (with POCO entities). After the query is written normally using linq to entities and obtaining an IQueryable<T> object, this implementation transparently does the following:

                                          CLIENT side:
                                          - Expands the query expression tree to correctly manage lambda expressions.
                                          -…

                                          7 votes
                                          Vote
                                          Sign in
                                          Check!
                                          (thinking…)
                                          Reset
                                          or sign in with
                                          • facebook
                                          • google
                                            Password icon
                                            I agree to the terms of service
                                            Signed in as (Sign out)
                                            You have left! (?) (thinking…)
                                            0 comments  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →
                                          • Don't see your idea?

                                          Entity Framework Feature Suggestions

                                          Feedback and Knowledge Base