Entity Framework Feature Suggestions

Welcome! You can use this site to tell the EF 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: EF6 and EF Core.
  • 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. 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 →
                        • 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 →
                                • 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 →
                                    • Support for Linked SQL Servers

                                      Add support for Linked servers.

                                      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 →
                                      • WF / EF integration

                                        It would be nice if you could somehow link the WF designer with the EF designer so that entities can more easily be integrated with workflows.

                                        A form designer link would also be beneficial. Define the entities, start with a form generated is a similar way as is done today with ASP.Net Dynamic data but have the ability to make changes to the templates visually. Then allow us link everything together with workflow.

                                        Have integrated templates for deployment as WPF, Silverlight, ASP.Net and SharePoint 2012 deployments.

                                        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 →
                                        • Visual Studio Database Project integration

                                          Support for updating a Visual Studio Database Project(s) instead of updating the db directly with an ad-hoc file.

                                          Currently 4.0 allows us to generate our database schema from the model but its capabilities are limited and destructive:
                                          unique keys – no support
                                          schema generation – destructive

                                          Database Projects for Visual Studio has already matured and more importantly has the capability of updating schemas without being destructive to the data. It would be nice to see the next designer integrate fully with this product rather than re-invent the wheel. For those of us that manage our databases using Database Projects this…

                                          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