Entity Framework Core Feature Suggestions

Welcome! Use this web site to submit ideas and vote for what features you want to see in future versions of Entity Framework Core.

Our team will only fix bugs, implement small improvements and accept community contributions in the EF6 codebase. Larger feature work and innovation will happen only in the EF Core codebase. If you have ideas for improving EF6, we recommend you submit them on the EF6 GitHub site listed below.

Please also consider these other options before submitting anything to this site:

  • If you want to learn how to use our products, visit our documentation pages.
  • If you want to report bugs, make contributions, or learn about our product roadmaps, visit our EF Core or EF6 project pages on GitHub.
  • If you have technical questions or need help, try StackOverflow’s EF Core or EF6 tags, or visit our MSDN forums. Note that roadmap questions, bug reports, feature requests or ideas are not appropriate for StackOverflow. Visit StackOverflow’s help center for guidance on appropriate usage.

How can we improve 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. 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 →
    • 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 message 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 →
                      • 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 →
                          • Allow foreign key columns to be shared between a subset of TPH subclasses

                            Scenario in the post http://entityframework.codeplex.com/workitem/583 works only for columns that are not foreign keys.

                            For example we have BaseEntity and three inherited entities:
                            InheritedEntity1.Name
                            InheritedEntity2.SpecialStatus
                            InheritedEntity3.SpecialStatus

                            SpecialStatus is entity stored in separate table.

                            BaseEntity table will have columns 'Name', 'SpecialStatus_Id', 'SpecialStatus_Id1'

                            Try to change the name of the column:
                            modelBuilder.Entity<InheritedEntity2>().HasOptional(p => p.SpecialStatus).WithOptionalDependent().Map(i => i.MapKey("SpecialStatus_Id"))
                            modelBuilder.Entity<InheritedEntity3>().HasOptional(p => p.SpecialStatus).WithOptionalDependent().Map(i => i.MapKey("SpecialStatus_Id"))

                            and get an ModelValidationException:
                            "One or more validation errors were detected during model generation:
                            SpecialStatus_Id: Name: Each property name in a type must be unique. Property name 'SpecialStatus_Id' is already defined.
                            "

                            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 →
                            • Persistent caching of auto-compiled queries

                              I know that EF code first automatically compiles queries and caches the results. But "Cold" queries are so slow.. Is possible to persist auto-compiled queries somewhere in the database so EF won't need to re-compile them again if that cache is lost (app restarted).

                              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 →
                              • namespace complex types

                                Place complex types generated by the database in their own namespaces. Right now, when a stored procedure is imported, a complex type is generated and placed in no particular namespace, so all of the complex types are floating about.

                                Perhaps instead, use the namespace that's been given to the model.

                                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  ·  Flag idea as inappropriate…  ·  Admin →
                                • Throw exception when you attempt to access a navigation property that is not loaded

                                  Of course this should be an optional feature that can be enabled from the DbContext configuration. It only makes sense when Lazy Loading is disabled.

                                  This will be particularly useful for writing domain models that are independent of the data access technology and thus cannot use the EF functions to check whether a property is loaded.

                                  Currently, if the logic inside the domain model tries to access a navigation property that is not loaded, this will either fetch the data from the database if lazy loading is enabled (a lot of developers do not like lazy loading) or, if lazy…

                                  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  ·  Flag idea as inappropriate…  ·  Admin →
                                  • Improve performance of adding many entities to DbContext (DetectChanges, AutoDetectChangesEnabled)

                                    The performance hit of adding (and possibly other operations) many entities to the context is so big, that you've introduced the AutoDetectChangesEnabled switch https://msdn.microsoft.com/en-gb/data/jj556205.aspx. This increases the code complexity and leads to nasty bugs. This is not ok and should be redesigned to work fast out-of-box. E.g. by upgrading from EF5 to EF6, due to this feature, the performance of some code has degraded by many orders of magnitude

                                    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 →
                                    • Native support for defining filtered unique and/or nonclustered indexes

                                      IndexAttribute does not allow me to definite filtered indexes. Instead, I have to execute raw SQL.

                                      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  ·  Flag idea as inappropriate…  ·  Admin →
                                      • More precise log messages

                                        When I was experimenting with EF7 and mapped an identity column to a Int64 property, I got an exception. Unfortunately the exception did not told me:
                                        - which entity
                                        - which property
                                        had that mapping error...

                                        So really, instead of having 2 pages of stack trace, those 2 words would have been more useful... NHibernate does this, don't tell me that a new ORM (almost 1 and a half decade after the birth of NH) is not capable of doing at least the same as the old ORM...

                                        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…)
                                            1 comment  ·  Flag idea as inappropriate…  ·  Admin →
                                          1 2 6 8 10 15 16
                                          • Don't see your idea?

                                          Entity Framework Core Feature Suggestions

                                          Feedback and Knowledge Base