Entity Framework Core Feature Suggestions

Welcome! Use this web site to submit ideas and vote for what features you want to see in future versions of Entity Framework Core.

Our team will only fix bugs, implement small improvements and accept community contributions in the EF6 codebase. Larger feature work and innovation will happen only in the EF Core codebase. If you have ideas for improving EF6, we recommend you submit them on the EF6 GitHub site listed below.

Please also consider these other options before submitting anything to this site:

  • If you want to learn how to use our products, visit our documentation pages.
  • If you want to report bugs, make contributions, or learn about our product roadmaps, visit our EF Core or EF6 project pages on GitHub.
  • If you have technical questions or need help, try StackOverflow’s EF Core or EF6 tags, or visit our MSDN forums. Note that roadmap questions, bug reports, feature requests or ideas are not appropriate for StackOverflow. Visit StackOverflow’s help center for guidance on appropriate usage.

How can we improve 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. Mapping single model to multiple databases

    Like to be able to build a domain model over data in multiple databases. With out having to manage database objects - linked servers, views etc.

    1,825 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…)
      31 comments  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →
    • IndexAttribute

      Create a IndexAttribute for annotating entities with index hints for the Database.
      For Example

      [Index(Direction.Ascending)]
      string MyProptery{Get;set;}

      1,186 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…)
        14 comments  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →
      • XML data type support

        EF full support of XML field

        753 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  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →
        • 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.

          651 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 →
          • Merge method: automatic synchronization of relationships on a disconnected entity

            A problem encountered when an entity is instantiated using non-ef infrastructure, e.g. ASP.NET MVC model binder mechanism. Such entity is pure poco class without proxy. Updates of relationship of the entity can be only synchronized using manual approach according to MSDN(and proven by experience)
            http://msdn.microsoft.com/en-us/library/ee373856.aspx "If you are working with disconnected objects you must manually manage the synchronization."
            Manual synchronization is really painful approach and really not a good ORM style solution.
            The problem even becomes critical for me in decision to migrate my application to nhibernate due to the fact that nhibernate can do such synchronization without problems http://www.codinginstinct.com/2009/11/nhibernate-feature-saveorupdatecopy.html

            457 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 →
            • Ability to specify query and table hints in SQL Server

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

              Also should support controlling parameter sniffing

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

              436 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

                315 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…)
                  16 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…

                  280 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 →
                  • 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 =…

                    273 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 →
                    • 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.

                      272 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 →
                      • 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.

                        234 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

                          232 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 →
                          • Easy way to log SQL statements

                            Currently this requires lots of ceremony setting up ILogger infrastructure as described in https://docs.microsoft.com/en-us/ef/core/miscellaneous/logging.

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

                              187 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.

                              • Support for streams instead of byte arrays for varbinary fields

                                Support for mapping System.IO.Stream to Binary fields

                                177 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 →
                                • 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…

                                  165 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 →
                                  • 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 →
                                    • Discriminator column support in TPT inheritance

                                      Currently, a discriminator column is only possible in TPH scenarios. The rational behind this is that in TPT the entity type can be inferred by joining. This is true but costly. In a serious application with many rows, the existence of a discriminator can have many benefits. For instance: one can create a composite index on the discriminator and primary key, on the base table (I could also use an index on primary key, filtered by the discriminator).

                                      145 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 →
                                      • Detach entire object graphs

                                        I would like the option to detach an entire loaded object graph easily using the DbContext API. And to attach the graph again with several option for choosing if existing data should be overwritten or not.

                                        111 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 →
                                        • Richer collection support, including ordered collections and dictionaries of value types

                                          It would be very nice to be able to support properties which are collections of value types. Just to have an array of doubles I shouldn't need to map each value to a class. NHibernate has this feature. E.g.
                                          class Benchmark
                                          {
                                          public long Id {get; set;}
                                          public string Name {get; set;}
                                          public IDictionary<DateTime, double> Returns {get; set;}
                                          public int[] Vector {get; set;} // preserve the order too
                                          }

                                          101 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 →
                                          ← Previous 1 3 4 5 6 7
                                          • Don't see your idea?

                                          Entity Framework Core Feature Suggestions

                                          Feedback and Knowledge Base