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 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.
  • 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. Property to inform when entity is being materialized

    If you perform business logic in the entitys OnPropertyChanged event handler, eg. calculating some related properties or changing a state property when certain properties are changed, your code is also run when the entity is fetched from the database. This is not a real change of the entity, it is just being loaded. It would be nice if the EntityObject class had a property bool IsMaterializing that was true so you could break out of the OnPropertyChanged handler.

    4 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 →
    • Ability To Create Read-Only Entities

      There are times I want to show data like a report where I don't need all the required fields from the DB because I will NEVER write the data back. It would be nice to be able to create an entity, limit which CRUD operations it supports, and allow some required fields to not be present in the entity if I don't support CREATE or UPDATE...

      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  ·  Flag idea as inappropriate…  ·  Admin →
      • Allow dynamically adding properties to entities and complex types

        want to use the entity framework. However I also have the requirement of allowing my users to define custom fields in our system. I would like to still use the entity framework and not use a a partial class with a hash table property.

        79 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 →
        • 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 →
          • ToTable without arguments

            With Entity Framework 4.1 code first, allow me to specify ToTable on an entity configuration and let the underlying database pick the appropriate table table, while still having the effect ToTable has for TPH or TPC in the physical model of the database.

            1 vote
            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 of chained Transactions

              Support of common transaction to execute data modification instructions natively in the entity context across two or more tables in the model

              3 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 →
              • Complex (struct) key properties for tables with multiple primary keys. Enabling easier search by key

                Some tables have more than one field included in primary key.

                This makes definition of generic methods that search by key hard to implement.

                If it would be possible to combine all database keys into one struct in model, and enable T4 templates to recognize which property is the key, template-generated repository could be much more powerful.

                4 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 →
                • More options in Code-First db generation

                  There should be more control on the generated Database:
                  - Default values,
                  - Relationship names,
                  - Description fields should/shouldn't be gererated (according to metadata/xml documentation in the entities)
                  - Constraints
                  - Propery enum types should be automatically generated to the underlying enum type (enum AddressType : byte should be stored as byte)

                  61 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 →
                  • 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 →
                    • Formulas in properties / calculated properties

                      Allow having properties that contain the result of formulas. The formula should be specified in a new attribute or fluently.

                      1 vote
                      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 →
                      • 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
                        }

                        98 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 →
                        • Conditional table splitting with 1 to 0..1 relationship.

                          Sometimes I want to move one or more properties of an entity to a separate class.

                          This is possible with a 1 to 1 relationship, however, there is no option to do this with a 1 to 0..1 relationship, where if the properties are null relationship is 0, otherwise it is 1.

                          2 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 →
                          • Better support for mainframe databases like DB2

                            Please add support for connecting to and using mainframe databases like DB2. We can't wait for IBM to get their act together and produce a usable EF provider.

                            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  ·  tools  ·  Flag idea as inappropriate…  ·  Admin →
                            • Allow SqlQuery to execute partial property select statement.

                              SqlQuery does not allow you to execute select query that has missing map on your POCO class. There are case that we need to to fill our POCO class with certain selection of property only.

                              1 vote
                              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 →
                              • 3 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 interfaces as entity and complex types

                                  It's unfortunate not to be able to mark interfaces for EF mapping (code first). This will allow to really abstract the implementation. Allows a unique representation of the data in the context of RIA Services (if Ria Services allows also for interface 'mapping'). This won't be very hard to implement since EF is happy when it subclasses... For the benefits: imagine you have only interfaces to declare your model. On the server side, you use EF to get your interfaces 'filled' from DB. on the client side you get those same interfaces filled by RIA services... You can reuse any…

                                  792 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…)
                                    20 comments  ·  Flag idea as inappropriate…  ·  Admin →
                                  • Delete orphans support

                                    Entity Framework should support automatic deletion of orphan records, the way "all-delete-orphan" works in NHibernate.

                                    If I have a one-to-many relationship between Orders and OrderLines, and code inside the Order class calls OrderLines.Remove(orderLine), this should cause the order line to be deleted when I save changes. Currently, EF attempts to set the order line's OrderID to NULL. If the OrderID column is non-nullable, the update fails with a constraint violation error.

                                    I found this forum post in which Daniel Simmons from Microsoft says EF doesn't support this: http://social.msdn.microsoft.com/forums/en-us/adodotnetentityframework/thread/CB9C1C4A-DF12-44E4-B00A-417C80BF5453

                                    This is an important feature for an ORM, since it's difficult to…

                                    670 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 →
                                    • Custom mapping for complex types

                                      Suppose I have a complex type called "Address". I also have two entities, one called "Customer" with a "Street1" property, and a second called "Business" with an "Address1" property. Being able to map these entity properties to the same complex type would be helpful even though the property names do not match.

                                      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  ·  Flag idea as inappropriate…  ·  Admin →
                                      • Eager loading for properties of derived classes

                                        In entity framework there should be a way to eager load (include) navigation properties of a derived class.

                                        When in an data model for entity framework has a navigation property it is not posseble to eager load that navigation property besides when using OfType<> or when eager loading the derived type itself by a navigation property.
                                        This could be done by using a special syntax of the include path.
                                        Since a property of the base class can not have the same name as the derived class, it would also be possible to navigate to the derived class by its name.

                                        770 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…)
                                          21 comments  ·  Flag idea as inappropriate…  ·  Admin →
                                        • dynamic discriminator

                                          use in the discriminator column the assemblyqualifiedname to be able to store any class that extend the base entity

                                          3 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