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. Allow "normally"/correctly formatted connection strings

    Connection string sections now needs two connection strings: one for EF to use, and one for all other standard .Net Framework APIs utilising the same database.

    This is kinda bizarre, violating DRY, KISS etc.

    The requested change:
    Have a config section for EF.
    Have all non-standard connection string settings set here.
    Have it reference the regular connection string section to get the standard settings for the database.
    Combine the settings within the framework in order to make a connection.

    Simple, no?

    8 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  ·  Flag idea as inappropriate…  ·  Admin →
    • Support Pessimistic Concurrency

      Allow a Select with UpdLock which locks all returned entities in the Database. This is a basic requirement to program for example a ticket sales portal with entity framework! So far it's not possible and I still have to stick to NHibernate :(

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

        8 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 →
        • Support for .Contains(Entity)

          Be able to write code like "if (Context.Table.Contains(entity))"

          8 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 →
          • Deprecate Timestamp annotation in favor of RowVersion

            Considering that "timestamp" has been deprecated in SQL Server for some time and is a synonym for the more precise denomination "rowversion", introduce the RowVersion data annotation in EF as an alternative to Timestamp and mark the current Timestamp annotation as deprecated.
            http://msdn.microsoft.com/en-us/library/ms182776.aspx

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

              8 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 →
              • Self tracking

                Allow using self tracking in case of "ApplyChanges" to object holding different references (same entitiy loaded from different context or pass using WCF) but actuality they are the same entity (have the same EntityKey) then the entities will be identify by the entity key and not the specific reference.

                8 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 →
                • Migrations: Allow Multiple Migration SQL Generator per Provider

                  One way to allow community to contribute to EF Migrations is allow us to create more `MigrationOperation`s.

                  For example, people can then add things like full text index, etc., things that are not in the core EF Migrations and are just boring SQL statements that need to be combined together.

                  Currently, to build a provider agnostic `MigrationOperation`, you need to write the SQL generated for the operation in a class derived from `MigrationSqlGenerator`. If you want to add `CreateFullTextCatalog` operation and support SQL Server for example, you inherit `SqlServerMigrationSqlGenerator`, add a `Generate` method for your operation, and ensure all other…

                  8 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 tables with the same name but diffrent schema

                    assume we have a table named Transaction with a schema GL and another one named Transaction but belongs to AR schema,
                    until now , could not be mapped in code-first

                    8 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 Include() and Projections to Co-Exist

                      If you use a projection in the select part of a query, any eager loading of data through the use of Include() in the main query is ignored... as explained here http://social.msdn.microsoft.com/forums/en-US/adodotnetentityframework/thread/d700becd-fb4e-40cd-a334-9b129344edc9/

                      This is short sighted. I like Include() because I can dynamically append them to a query, the work around of putting the data to be "Included" in the projection does not allow for this dynamic extension oof the query.

                      If a developer has explicitly stated they wish to Include some related data they are doing it for a reason, so it should be respected.respected that they are doing…

                      8 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  ·  Flag idea as inappropriate…  ·  Admin →
                      • Weak references in the object context

                        Weak references would allow the context to cache objects but allow the caller can use a single context without wasting memory.

                        Example:
                        An embedded device where there is no clean unit of work. When something is loaded into the device it must process it, and when that something is done the user may remove it at some later point. It processes many somethings simultaneously, up to maximum capacity.

                        For now, we either use NoTracking objects or create a context for each object. This induces a lot of unnecessary overhead.

                        A weak reference would mean one context, no memory growth, but…

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

                          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…)
                            1 comment  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →
                          • Add option to update model from database project

                            It would be great to update the EDMX from a database project. Currently we are working with an database project containing the tables, indexes, stored procedures, types etc... If we are able to update the EDMX directly from the database project, it would remove an extra step to connect with a database. In this way, we don't even need a hosted SQL server to update the EDMX.

                            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 →
                            • More descriptive error messge when using non-generated POCO - Mapping and metadata information

                              Need more detail as to why EF gives this excpetion "Mapping and metadata information could not be found for EntityType". Usually it is a name mismatch, but with large modesl it can be hard to pinpoint the source of the error.

                              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 →
                              • 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 →
                                • Clear all entities in a set.

                                  Need to be able to call Clear on an EntitySet to delete all entities from that set (i.e. rows from underlying table). When called as myObjectContext.MyCustomers.Clear() it would delete all rows in the underlying table.

                                  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…)
                                    1 comment  ·  Flag idea as inappropriate…  ·  Admin →
                                  • Allow inserting new entities with predefined identity column values (INSERT_IDENTITY)

                                    Especially for migration projects it would be useful to allow entities to be saved with predefined identity values.

                                    Until now you have to use ADO.NET to do this.
                                    SET IDENTITY_INSERT TableName ON
                                    INSERT INTO TableName (IdColumn, Column1)
                                    VALUES (234, 'Value')

                                    I would like to tell the DbContext to use this feature when saving new entities.

                                    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  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →
                                    • Code First (EF6) Ignore certain properties so they aren't mapped to stored procedures

                                      When mapping Properties to Stored Procedure parameters it is not possible to ignore any properties that the Stored Procedure doesn't require/isn't expecting e.g. a field that the DBMS populates. In the example below the DateCreated property is defaulted in the DBMS to the current date/time so isn't required as a parameter, but is to be shown on the blog post UI so needs to be part of the model. Ideal would be to have an IgnoreParameter option

                                      public class Blog
                                      {
                                      public int BlogId { get; set; }
                                      public string Name { get; set; }
                                      public string Url { get;…

                                      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…)
                                        2 comments  ·  Flag idea as inappropriate…  ·  Admin →
                                      • Support for multiple result sets in .ExecuteFunction() and .ExecuteQuery()

                                        public Tuple‹T1, T2› ExecuteQuery‹T1, T2›(string query) { ... }
                                        public Tuple‹T1, T2, T3› ExecuteQuery‹T1, T2, T3›(string query) { ... }

                                        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…)
                                          1 comment  ·  runtime  ·  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 →
                                          1 2 8 10 12 18 19
                                          • Don't see your idea?

                                          Entity Framework Feature Suggestions

                                          Feedback and Knowledge Base