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. AddObject or Attach should not add or attach whole object graph

    AddObject and Attach methods should have optional parameter to specify, if I want to add or attach whole object graph or the signle object only.

    If I have two related objects, which are detached) and one is new and the other existing, it is very tricky to put them in ObjectContext.

    40 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 →
    • Support for MERGE (UPSERT) statement

      I would like to see the T-SQL MERGE statement supported. For multi threading situations it really would be useful.

      38 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 →
      • Result of Sum() of an empty set should be 0 rather than NULL in LINQ to Entities

        Currently if an empty set is expected it is necessary to cast either the result or the input elements of Sum to Nullable<T> to compensate for the type mismatch between the SQL database and the signature of the methods in LINQ.

        38 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 →
        • More constructors for providing connection string information to MigrateDatabaseToLatestVersion

          I'm obtaining my connection string through a non-default mechanism. When I Database.SetInitializer() to the MigrateDatabaseToLatestVersion<,> class, I cannot specify a DBConnection, DBConnectionInfo, or connection string even though the DBMigrationsConfiguration has a TargetDatabase property. I would prefer to be able to pass a DBConnection into the initializer class (since I'm using the same method to instantiate my DbContext); however, I should at least be able to pass in a DBConnectionInfo so that I don't have to subclass or use servicelocation just to use my own connection string.

          32 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 →
          • Built-in entity auditing!

            EF should have some better data change tracking/auditing plumbing...on par with the extensive trace listener class support in ASP.NET. In order to create an audit history of the CRUD actions taking place within my entity model in EF 4.0, I had to write a lot of custom code and override the SavingChanges event and the OnContextCreated method to make it happen. Even now it doesn't properly catch all actions due to certain limitations (such as having DB-set identity fields). Think about how to make auditing data changes simpler and richer for devs!

            31 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 →
            • Support for DateTime built-in operations in LINQ to Entities

              Some customers want to write queries that include such expressions as "date1 - date2" or "datetime3 + timespan1 > datetime4". LINQ to Entities currently support some of date/time operations through the EntityFunctions.AddX and DiffX functions, but it doesn't support built-in operators with data/time types.

              31 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 →
              • Bulk Insert

                ADO.Net supports bulk insert for big amount of data. With the help of this library
                http://archive.msdn.microsoft.com/LinqEntityDataReader
                It is possible to do Bulk inserts with entities. But it would be nice if there would be a integrated approach.

                30 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 IEnumerable<T>

                  Sometimes we wish to expose a collection as read only, normally using IEnumerable<T> instead of ICollection<T>. This is not recognized in the current version, but it should.

                  29 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 →
                  • Delete Collections

                    I think there would be nice idea if you give method to delete collection. Without using foreach statement.

                    Now:
                    foreach(var item in collection)
                    {
                    db.Customers.Remove(item);
                    }
                    db.SaveChanges();

                    and should be simply

                    db.Delete(collection);
                    db.SaveChanges();

                    28 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 →
                    • Support unsigned integer (e.g. uint) properties and keys

                      If my model contains an int ID it's automatically detected as a Key field.
                      I'd like to have the same support for uint ID and similar types.

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

                        This is actually going to be supported in EF7, with a few caveats:

                        1. We won’t try to automatically convert values to different types to compensate for lack of native support in the underlying data provider, so for the particular case of SQL Server we won’t have support for unsigned integers, at least at first.
                        2. EF7 is a new codebase and not a superset of EF6 (see http://blogs.msdn.com/b/adonet/archive/2014/10/27/ef7-v1-or-v7.aspx) so existing applications built against EF6 won’t benefit without porting.

                      • Exclude function as opposed to Include

                        There should be to each Linq to Entities query an extension "Exclude" that returns IEnumerable<TSource> and the excluded fields will not be selected from the store/source.

                        26 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 →
                        • Partial SaveChanges

                          Should be able to SaveChanges of certain entities while leaving the other entities in Added etc. mode, this is useful when you want to save data in a page that some other parts of the page contain invalid data that can't be saved.

                          23 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 →
                          • Update database without seeding

                            It would be great to be able to do an "update-database" without having to execute the seeding commands as well. We are seeding quite a lot of meta data into our system, and it is a waste of time to wait for seeding each time we update/manipulate our model.

                            A flag in command prompt like

                            update-database -noseeding

                            would suffice.

                            23 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 →
                            • Updating the F# SqlEntityConnection Type Provider for EF 6

                              The F# SqlEntityConnection Type Provider is a third way to interact with Entity framework (with the other two being an .edmx file and Code First).
                              http://msdn.microsoft.com/en-us/library/hh362322.aspx

                              This Type Provider doesn't support the updated low-level API changes that EF 6 requires, as far as I can tell. I'd love to have an updated version that supports the async features of EF 6.

                              22 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 →
                              • Foreign key (from attribute and fluent) without navigation property

                                Right now you have to define a navigation property set a foreign key constraint on a column.
                                For people that want to achieve some independence from EF (using the repository pattern, for example, and a key-value store as a possible alternative), plainer POCOs with just ids are important.
                                For example, with the repository pattern, I am right now able to use the same data classes and the same IRepository for an EF backed data store and a Redis-backed one.

                                Defining a foreign key without the navigation property is still important and useful for data integrity.

                                If could be something like …

                                22 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 →
                                • More informatin from referential integrity constraint violation exception

                                  I get so frustrated by the referential integrity constraint violation and the fact that the exception thrown contains no information about which fields are causing the problem.

                                  Here's the full message for reference:
                                  "A referential integrity constraint violation occurred: The property values that define the referential constraints are not consistent between principal and dependent objects in the relationship."

                                  Could you please update this exception to provide some key information so that we can track this issue down?

                                  Thanks,
                                  -Aaron

                                  21 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 →
                                  • 19 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 →
                                    • Be able to configure initial value for identity column

                                      Currently when configuring Identity columns we can't declare the initial value. It would be nice to add an option in order to specify the initial value. This is not respected when we reverse engineer an existing database as well

                                      19 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 intercept and cancel changes to properties

                                        (Note that the original description of this idea talked about making PropertyChangingEventArgs cancellable. Although this is an interesting request, it is not a change we could implement in EF. In fact, there is probably not way it can be implemented in .NET without defining a new standard interface for change tracking)

                                        Rather than declining the idea, I am renaming it to capture the essence that is still potentially applicable to EF: provide a hook that can be used by an application or library to intercept what happens whenever EF detects that a property of a tracked object is being changed…

                                        17 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 intercept when an association is being changed

                                          There should be an AssociationChanging in System.Data.Objects.DataClasses.RelatedEnd class, so I can validate before items get attached to a relation.

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

                                          Entity Framework Feature Suggestions

                                          Feedback and Knowledge Base