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 Connect site for Visual Studio and .NET.

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…)
Reset

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.

  • Hot ideas
  • Top ideas
  • New ideas
    1. Async/Await supported asynchronous calls

      With the looming release of Dot.Net 4.5 and Windows 8 we are really going to been aync calls which return a Task so there is support for the async/await keywords in C# 5.0

      Database operations can be notoriously slow making it highly necessary to delegate these tasks to an asynchronous model.

      Windows 8 dictates that if any operation in a metro style app takes longer than 50ms it should be async.

      await context.SaveChangesAsync()

      371 votes
      Vote 0 votes Vote Vote
      Vote
      Sign in
      Check!
      (thinking…)
      Reset
      or sign in with
      • facebook
      • google
        Password icon
        I agree to the terms of service

        You'll receive a confirmation email with a link to create a password (optional).

        Signed in as (Sign out)
        You have left! (?) (thinking…)
        planned  ·  14 comments  ·  runtime  ·  Admin →
      • Support for simple type mapping or mapped type conversions

        Currently the only conversion available in EF Core libraries 4.5 and EF 5.0 are enums mapped to integers but that is only tip of the iceberg. There is whole big feature behind - simple type mapping or conversions defined directly in mapping.

        For example what if my database contains char column with Y, N values and I want to map it to bool property directly without any additional stuff doing the conversion inside my entity? Or more complex example - what if my column contains value like en-us and I want to map it to instance of CultureInfo? There are… more

        125 votes
        Vote 0 votes Vote Vote
        Vote
        Sign in
        Check!
        (thinking…)
        Reset
        or sign in with
        • facebook
        • google
          Password icon
          I agree to the terms of service

          You'll receive a confirmation email with a link to create a password (optional).

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

            You'll receive a confirmation email with a link to create a password (optional).

            Signed in as (Sign out)
            You have left! (?) (thinking…)
            0 comments  ·  runtime  ·  Admin →
          • Provide mechanism to statically define 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… more

            31 votes
            Vote 0 votes Vote Vote
            Vote
            Sign in
            Check!
            (thinking…)
            Reset
            or sign in with
            • facebook
            • google
              Password icon
              I agree to the terms of service

              You'll receive a confirmation email with a link to create a password (optional).

              Signed in as (Sign out)
              You have left! (?) (thinking…)
              2 comments  ·  runtime  ·  Admin →
            • Use several Code First Data Contexts and several (different) Migrations in one database

              Say there is one database shared by several applications, objects are separated by schema. So it would be nice to be able to store and apply migrations for one schema independently from another one.

              32 votes
              Vote 0 votes Vote Vote
              Vote
              Sign in
              Check!
              (thinking…)
              Reset
              or sign in with
              • facebook
              • google
                Password icon
                I agree to the terms of service

                You'll receive a confirmation email with a link to create a password (optional).

                Signed in as (Sign out)
                You have left! (?) (thinking…)
                5 comments  ·  runtime  ·  Admin →
              • Improve the performance of the Contains() operator

                Currently, using the Contains() LINQ operator in EF queries causes a significant performance hit. See http://stackoverflow.com/questions/7897630/why-does-the-contains-operator-degrade-entity-frameworks-performance-so-drama for documentation and discussion of this problem. Please improve the performance of this operator.

                99 votes
                Vote 0 votes Vote Vote
                Vote
                Sign in
                Check!
                (thinking…)
                Reset
                or sign in with
                • facebook
                • google
                  Password icon
                  I agree to the terms of service

                  You'll receive a confirmation email with a link to create a password (optional).

                  Signed in as (Sign out)
                  You have left! (?) (thinking…)
                • 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 =… more

                  20 votes
                  Vote 0 votes Vote Vote
                  Vote
                  Sign in
                  Check!
                  (thinking…)
                  Reset
                  or sign in with
                  • facebook
                  • google
                    Password icon
                    I agree to the terms of service

                    You'll receive a confirmation email with a link to create a password (optional).

                    Signed in as (Sign out)
                    You have left! (?) (thinking…)
                    1 comment  ·  runtime  ·  Admin →
                  • I should be able to set the default db schema name that will be used

                    If I create a new application and therefore a new DBContext, the template should have a way for me to set the db schema name I would like to use. I shouldn't have to rename tables later on to achieve this.

                    This will allow me to run multiple applications / clients from the same database.

                    25 votes
                    Vote 0 votes Vote Vote
                    Vote
                    Sign in
                    Check!
                    (thinking…)
                    Reset
                    or sign in with
                    • facebook
                    • google
                      Password icon
                      I agree to the terms of service

                      You'll receive a confirmation email with a link to create a password (optional).

                      Signed in as (Sign out)
                      You have left! (?) (thinking…)
                    • Code First support for Table-Valued Functions

                      The EF team has marked the previous TVF feature suggestion as Completed saying TVF support will be included with .NET 4.5. It had 226 votes at the time. However, this excludes Code First support. Vote for this suggestion to specifically add Code First support for TVFs.

                      20 votes
                      Vote 0 votes Vote Vote
                      Vote
                      Sign in
                      Check!
                      (thinking…)
                      Reset
                      or sign in with
                      • facebook
                      • google
                        Password icon
                        I agree to the terms of service

                        You'll receive a confirmation email with a link to create a password (optional).

                        Signed in as (Sign out)
                        You have left! (?) (thinking…)
                        planned  ·  0 comments  ·  runtime  ·  Admin →
                      • Support concurrency checks in derived types when using TPT inheritance

                        Remove the limitation to perform concurrency checks on derived types. Now you may only use properties from the base type for concurrency checks.

                        9 votes
                        Vote 0 votes Vote Vote
                        Vote
                        Sign in
                        Check!
                        (thinking…)
                        Reset
                        or sign in with
                        • facebook
                        • google
                          Password icon
                          I agree to the terms of service

                          You'll receive a confirmation email with a link to create a password (optional).

                          Signed in as (Sign out)
                          You have left! (?) (thinking…)
                        • 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.

                          4 votes
                          Vote 0 votes Vote Vote
                          Vote
                          Sign in
                          Check!
                          (thinking…)
                          Reset
                          or sign in with
                          • facebook
                          • google
                            Password icon
                            I agree to the terms of service

                            You'll receive a confirmation email with a link to create a password (optional).

                            Signed in as (Sign out)
                            You have left! (?) (thinking…)
                            0 comments  ·  runtime  ·  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.
                            -… more

                            7 votes
                            Vote 0 votes Vote Vote
                            Vote
                            Sign in
                            Check!
                            (thinking…)
                            Reset
                            or sign in with
                            • facebook
                            • google
                              Password icon
                              I agree to the terms of service

                              You'll receive a confirmation email with a link to create a password (optional).

                              Signed in as (Sign out)
                              You have left! (?) (thinking…)
                              0 comments  ·  runtime  ·  Admin →
                            • Database First without EDMX Designer

                              The current EDMX designer doesn't work well for enterprise scenarios - it becomes incredibly cumbersome as the number of entities grows. For example:
                              * It forces the developer to arrange entities visually - once you get over about 10 entities or complex relationships between them, it becomes difficult to do.
                              * It's difficult to find entities - rather than scan for them alphabetically, I need to scroll around a complex diagram I don't really want.
                              * The wizards get in the way - updating my model continually prompts me to modify my connection strings, I need to manually select the… more

                              3 votes
                              Vote 0 votes Vote Vote
                              Vote
                              Sign in
                              Check!
                              (thinking…)
                              Reset
                              or sign in with
                              • facebook
                              • google
                                Password icon
                                I agree to the terms of service

                                You'll receive a confirmation email with a link to create a password (optional).

                                Signed in as (Sign out)
                                You have left! (?) (thinking…)
                                0 comments  ·  tools  ·  Admin →
                              • DbContext Generator/Reverse Engineer Code First features should generate POCOs with virtual properties to enable change tracking proxies

                                Currently, the EF 4.x DbContext Generator code generation item as well as the Reverse Engineer Code First menu item generates POCO classes that only have virtual on navigation properites. Hence, a lazy loading proxy will be generated for the classes at runtime. However, a change tracking proxy will not be generated. This causes performance problems if you have a lot of objects in the object context. Please at least add an option for making all the properties virtual, or, just make it do that by default.

                                1 vote
                                Vote 0 votes Vote Vote
                                Vote
                                Sign in
                                Check!
                                (thinking…)
                                Reset
                                or sign in with
                                • facebook
                                • google
                                  Password icon
                                  I agree to the terms of service

                                  You'll receive a confirmation email with a link to create a password (optional).

                                  Signed in as (Sign out)
                                  You have left! (?) (thinking…)
                                • Enhance Enums by creating a Lookup Table with the Enum items

                                  Now that EF 5 supports enums, please (optionally) create Lookup Tables in the database with the enum items or store them in the metadata.

                                  This enables Lightswitch and other apps to reconstruct the enums/use the Lookup Tables.

                                  11 votes
                                  Vote 0 votes Vote Vote
                                  Vote
                                  Sign in
                                  Check!
                                  (thinking…)
                                  Reset
                                  or sign in with
                                  • facebook
                                  • google
                                    Password icon
                                    I agree to the terms of service

                                    You'll receive a confirmation email with a link to create a password (optional).

                                    Signed in as (Sign out)
                                    You have left! (?) (thinking…)
                                    1 comment  ·  tools  ·  Admin →
                                  • Primary Key Update limitation

                                    My team doesn't support EF because of its Primary Key Update limitation :'( ...
                                    If you don't want to compromise the integrity of the project with this requirement, why not have the workarounds you suggest already included in the framework?

                                    6 votes
                                    Vote 0 votes Vote Vote
                                    Vote
                                    Sign in
                                    Check!
                                    (thinking…)
                                    Reset
                                    or sign in with
                                    • facebook
                                    • google
                                      Password icon
                                      I agree to the terms of service

                                      You'll receive a confirmation email with a link to create a password (optional).

                                      Signed in as (Sign out)
                                      You have left! (?) (thinking…)
                                      0 comments  ·  runtime  ·  Admin →
                                    • Allow ignoring issues with dropping non-existent foreign keys in Migrations

                                      When converting an existing system to Code First Migrations sometimes the schema is in an inconsistent state. In SQL we can handle this by testing for exists and only dropping if it does. I handled this in code by catching the exception when trying to drop a foreign key that doesn't happen to exist in the database being migrated. this works when run as part of the upgrade, but doesn't work when running the Update-Database Powershell command. Below I have copied the code and error message for some context.

                                      try
                                      {
                                      this.DropForeignKey("EDWAdmin.MetadataTableNote", "FK_MetadataTableNote_MetadataTable",);
                                      }
                                      catch
                                      {
                                      //swallow the exception if… more

                                      4 votes
                                      Vote 0 votes Vote Vote
                                      Vote
                                      Sign in
                                      Check!
                                      (thinking…)
                                      Reset
                                      or sign in with
                                      • facebook
                                      • google
                                        Password icon
                                        I agree to the terms of service

                                        You'll receive a confirmation email with a link to create a password (optional).

                                        Signed in as (Sign out)
                                        You have left! (?) (thinking…)
                                      • Support of multilingual entities

                                        Some applications require the ability to maintain data in different languages. In relational databases, a common implementation pattern to achieve this is to use a main table for the corresponding business entity with all persistent properties mapped to table fields, and a language (or localization) table for the language dependent properties of the same business entity. A single instance of a language dependent business entity is therefore represented as a single record in the main table, and multiple records in the language table, depending on the number of supported languages.

                                        It would be great when EF could support this pattern … more

                                        6 votes
                                        Vote 0 votes Vote Vote
                                        Vote
                                        Sign in
                                        Check!
                                        (thinking…)
                                        Reset
                                        or sign in with
                                        • facebook
                                        • google
                                          Password icon
                                          I agree to the terms of service

                                          You'll receive a confirmation email with a link to create a password (optional).

                                          Signed in as (Sign out)
                                          You have left! (?) (thinking…)
                                        • Object graph deep clone and object shallow Clone

                                          It would make sense to allow shallow and deep cloning as a default requirement. There are currently some work-arounds, like serializing and then deserializing or even detach and re-attach, but each has their downfalls and it makes sense to me to include such functionality in by default to ensure highest performance and stability

                                          1 vote
                                          Vote 0 votes Vote Vote
                                          Vote
                                          Sign in
                                          Check!
                                          (thinking…)
                                          Reset
                                          or sign in with
                                          • facebook
                                          • google
                                            Password icon
                                            I agree to the terms of service

                                            You'll receive a confirmation email with a link to create a password (optional).

                                            Signed in as (Sign out)
                                            You have left! (?) (thinking…)
                                            0 comments  ·  tools  ·  Admin →
                                          • Make Entity Framework Fully Mockable and injectable In general, mocking out the Entity Framework DAL is a big pain to accomplish. ObjectCon

                                            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… more

                                            15 votes
                                            Vote 0 votes Vote Vote
                                            Vote
                                            Sign in
                                            Check!
                                            (thinking…)
                                            Reset
                                            or sign in with
                                            • facebook
                                            • google
                                              Password icon
                                              I agree to the terms of service

                                              You'll receive a confirmation email with a link to create a password (optional).

                                              Signed in as (Sign out)
                                              You have left! (?) (thinking…)
                                              2 comments  ·  runtime  ·  Admin →
                                            ← Previous 1 3 4 5 6 7 8 9 10 11 12 13 14
                                          • Don’t see your idea?
                                          • Post a new idea…
                                          • Entity Framework Feature Suggestions

                                            Knowledge Base and Helpdesk