Entity Framework Feature Suggestions

Welcome! You can use this site to tell the EF team what features you want to see in future versions of our products.

Note that moving forward our team will be only fixing bugs, implementing small improvements, and accepting community contributions in the EF6 codebase. Larger feature work and innovation will happen in the EF Core codebase.

Please consider other options besides this site!

  • If you have technical questions or need help, try StackOverflow (EF6 and EF Core) or visit our forums.
  • If you want to learn how to use our products, visit our documentation pages: EF6 and EF Core.
  • If you want to report bugs or make contributions, visit our project pages on GitHub: EF6 and EF Core.

How can we improve Entity Framework or Entity Framework Core?

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 support and comment on it.

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

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

  1. Ability to specify NoLock and other query hints

    Table lock, update lock ( WITH(UPDLOCK) / FOR UPDATE ).
    LockMode something like NHibernate.

    Also should support controlling parameter sniffing

    http://stackoverflow.com/q/9890699/85196

    281 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…)
      8 comments  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →
    • Decouple entity creation in EF and support entities without default constructors and publically settable properties

      EF should decouple the implementation of the entity objects from the mapping functionalities. The EF team could provide the current entity creation as a default variant which can be attached to the mapper. The developer has the option to provide it's own data transfer object layer. Therefore we need to abstract the entities through interface usage an a generic naming schema (dot notation of an object model like Person.Name). So the EF would be much more flexible to use.

      Note by Diego Vega: I am merging this idea with a few other ideas that are approximately equivalent but extend in…

      274 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…)
        11 comments  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →
      • Flexible stored procedures support: allow mapping entities with complex types

        So far a stored procedure cannot be mapped to an entity with complex properties. Well it can be mapped, but the execution fails at runtime. It would be great if we could map stored procedure columns to entity properties.

        271 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 →
        • Offer eager loading strategies

          I supposed that eager loading currently supports only single fixed strategy and except some rare cases this strategy always joins all eager loaded data to one huge record set - at least that is what I saw so far.

          I described the impact of such eager loading on Stack Overflow: http://stackoverflow.com/q/5521749/413501

          It would be nice to have some control over the way how eager loading is executed with possibility to define if eager loaded data should be joined into single result set with the main data or if they should be executed in separate query.

          Something like:

          var data =…

          260 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 →
          • Full Text Search

            Provide Full-Text Search capabilities similar to Lucene.Net-NHibernate

            228 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…)
              4 comments  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →
            • Bring back CompiledQuery in DbContext

              CTP 5 dropped compiled query support, this is a huge mistake. Please make sure it is there in the final product.

              210 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…)
                12 comments  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →
              • Simple Static Delete and Update Methods

                Allow for simple delete and update operations that do not require multiple round trips to the database. They could be static methods on each Entity. For example:
                Cars.Delete(int ID)
                or
                Cars.Delete(Guid ID)

                This would delete a car record with the associated ID if it exists. The code generation template should be smart enough to create the static methods using the correct data type.

                For updates you would pass in the ID and a set of named parameters for the fields that need to be updated:

                Car.Update(10, {Status="Sold", ModifiedDate=DateTime.Now}

                I think people are doing this now using functions or executing SQL

                202 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…)
                  6 comments  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →
                • Make Entity Framework fully mockable and injectable

                  Make Entity Framework Fully Mockable and injectable

                  In general, mocking out the Entity Framework DAL is a big pain to accomplish. ObjectContext has no interface and the T4 templates aren't written to create interfaces for the objects they create.

                  This hampers good unit testing and makes them less injectable.

                  Put an interface on ObjectContext. Have the T4 Templates put interfaces around all of the objects that are generated and make sure that all objects used have interfaces so that mocking frameworks, like MOQ or Moles & Pex can automatically generate stubs to replace the objects in unit tests so that…

                  193 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 →
                  • Take namespaces into account in POCO mapping

                    This is a must for modularity. We already support this feature on our side with schemas (sql server) the only problem is EF does not take namespaces into account.

                    184 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 →
                    • Vastly improve LINQ translation

                      LINQ to SQL is the legacy alternative to EF. EF should support almost everything that L2S always did for two reasons:

                      a) to ease migration
                      b) because L2S was awesome and we want EF to be as well

                      Please address the issues mentioned in this post: http://scatteredcode.wordpress.com/2011/06/21/why-entity-framework-4-1s-linq-capabilities-are-inferior-to-linq-to-sql/

                      I did not author it, but I found many of those attempting to migrate a bug codebase. I was forced to abandon the migration because the issues were so many.

                      184 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 →
                      • Code First support for user defined functions (UDFs)

                        Similar to adding support for stored procedures in Code First, but for functions also.

                        Using model first, this is supported and using EdmFunctionAttribute they can be used from LINQ to Entities. I really miss this in the Code First approach.

                        See also: http://data.uservoice.com/forums/72025-ado-net-entity-framework-ef-feature-suggestions/suggestions/1607971-code-first-support-for-stored-procedures?ref=title

                        183 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…)
                          5 comments  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →

                          UPDATE: Reverting status from “under review” to “no status” since we aren’t currently working on this. We will still consider it for future releases.

                          UPDATE: EF6 now supports mapping stored procedures for CUD operations. More complete function support in Code First was postponed for schedule reasons.

                          The plan is to add support in Code First for all the same kind of functions that are supported by the core runtime, including stored procedures, user defined functions, and table valued functions.

                        • Class diagram for Code-First POCO classes

                          Need a new type of ClassDiagram tool for Code-First POCO classes which should be similar to Entity Designer, capable of showing relationships, keys, db schema related meta data etc.

                          173 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…)
                            26 comments  ·  tools  ·  Flag idea as inappropriate…  ·  Admin →
                          • 171 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  ·  Flag idea as inappropriate…  ·  Admin →
                            • Support for streams instead of byte arrays for varbinary fields

                              Support for mapping System.IO.Stream to Binary fields

                              171 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…)
                                8 comments  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →
                              • mapping to in-memory OLTP Tables

                                please add ability to create in-memory OLTP tables in next EF version

                                158 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 →
                                • Extra Lazy Loading

                                  When I do user.Cars.Add() EF load all Cars for that user.
                                  user.Cars.Count() too

                                  147 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…)
                                    6 comments  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →
                                  • Add support for dynamically extended queries as per LinqKit

                                    LinqKit has shown that is possible to make the creation of queries much more dynamic, with them being composed at run time dependent on external conditions. nHibernate is good at this and LinqKit helps, but it would be nice to have an official solution.

                                    143 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 →
                                    • Mechanism for statically defining eager loading for navigation properties

                                      Some times, depending on how you design your model, you want a certain navigation property to be loaded *always*. It's static part of the model just like the (implicit) lazy load nature of a virtual navigation property when lazy loading is configured.

                                      There should be a way to define eager load for navigation properties, something like:

                                      [Include]
                                      public ICollection<Item> Items { get; set; }

                                      and/or via DbModelBuilder:

                                      modelBuilder.Entity<Order>().Property(x => x.Items).Include();

                                      This would greatly simplify client code as it wouldn't have to include on each query/access, and it would also work with Find(key). This would make it more suitable to DDD-style…

                                      142 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…)
                                        4 comments  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →
                                      • SQL Variant support

                                        I would like EF to support sqlvariant columns like Linq to SQL does

                                        113 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  ·  Flag idea as inappropriate…  ·  Admin →
                                        • Allow using SQL Server 2012 sequence for generating primary key

                                          I would like support for SQL Server 2012 sequences to generate PK instead of identity. Coming from Oracle this is very important for me. See http://lennilobel.wordpress.com/2011/05/23/using-sequences-in-sql-server-denali/ for adding the DEFAULT consraint with NEXT VALUE FOR from a sequence.

                                          112 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  ·  Flag idea as inappropriate…  ·  Admin →
                                          • Don't see your idea?

                                          Entity Framework Feature Suggestions

                                          Feedback and Knowledge Base