Entity Framework Feature Suggestions

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

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

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

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

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

Entity Framework Feature Suggestions

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

There are two ways to get more votes:

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

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

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

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

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

  • Hot ideas
  • Top ideas
  • New ideas
  1. 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…

    6 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 →
    • Bulk Object Graph Persistence

      I would like to see the ability to persist an entire object graph in one DB call. Currently it is way to chatty with the DB which makes it really slow to persist.

      6 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 →
      • API to access MSL.

        System.Data.Mapping.StorageMappingItemCollection doesn't provide useful public API.

        6 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 →

          We are planning to include a public object model for mapping in EF6. This will be exposed in several places, including custom Code First conventions.

        • Navigation properties in composite ids without need for the corresponding scaler property

          If you have a class like

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

          you should be able to create a composite id like this

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

          without defining CustomerId and AddressId properties

          6 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 →
          • key

            Allow mapping of database views without requiring the Key Attribute

            When mapping entitis to Views, it´s common that no Key can be set, bescause the view does not provide it and you can´t map it. The idea is:

            * Make it possible to map to Views (or tables) in a read only fashion that does not require the Key Attribute

            6 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 →
            • 6 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 →
              • Extensible Cache

                Extensible first and second level cache.

                6 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 →
                • View Generated SQL

                  It'd be great if entity framework had an integrated tool such as the Profiler from Hibernating Rhinos (http://hibernatingrhinos.com/products/efprof).

                  I am aware that you can view the SQL generated for simple select statements by hovering over the DbSet member during debug but it would be nice to have a tool like this built into Visual Studio or that simply outputs the generated SQL to the debug console.

                  This should be configurable / able to be disabled.

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

                    using the include() with a 1 to many relationship, the data are loaded in the list without any specific order, forcing often to reload directly specifying the sort order

                    5 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 →
                    • Extensible Architecture

                      Give developers the power to customize and extend the Entity Framework!!!!

                      5 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 →
                      • Caching

                        Please include caching in EF. I have used Jarek Kowalski’s provider but it didn't cope with Stored Procedures or

                        5 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 LINQ datacontext in disconnected mode

                          Like datatable.Select(Filter) , we need to query what's already loaded in the datacontext using LINQ , something like a disconnected mode , this would be really gret feature , its so difficult to do right now

                          5 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 →
                          • Interception Mechanism

                            Allow specifying an interceptor (Castle, LinFu, Sprint.NET, etc) for modifying materialized entities. This allows injecting interfaces such as INotifyPropertyChanged, IEditableObject, etc.

                            5 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 →
                            • ColumnAttribute to set the name of a navigation property backing onto a real column

                              [Column("OwnerId")]
                              public virtual User Owner { get; set; }
                              some interest was expressed by the team on this so it may be in...

                              5 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 →
                              • Provide means to clear the database

                                Provide a method on the Database class to remove all data from the database without knowing anything about the underlying physical database schema, relationships and constraints.

                                This is critical in order to effectively test EF related code. While one way is to recreate the database every test, it has security and performance implications.

                                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 →
                                • Improved API for Migrations

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

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

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

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

                                  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 →
                                  • 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 →
                                    • Provide an Entity Framework Factory similar to the ADO.Net Provider which allows easy swapping betwe

                                      Provide an Entity Framework Factory similar to the ADO.Net Provider which allows easy swapping between different Entity Framework models such as SQL Server, Oracle, MySQL, DB2 etc. simply by providing the appropriate database provider information in a manner similar to the current ADO.Net Database Provider Factory.

                                      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 →
                                      • 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
                                        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 →
                                        • Improve conditionals on Table-per-Hierarchy

                                          It never works when your conditionals are based on a int column so where Type=1 etc. Only seems to work for when some column Is Null. It complains about mapping when you try and do this. Seems impossible to work around

                                          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 →
                                          • Don't see your idea?

                                          Entity Framework Feature Suggestions

                                          Feedback and Knowledge Base