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.

Please consider other options besides this site:

How can we improve Entity Framework?

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 different key names for parent entity

    It would be useful to be able to create relationships between entities where the parent entity does not use the primary key as it's end of the relationship. For example:

    public class Signer
    {
    [Key, Column(Order = 0)]
    public Guid EntityUUID { get; set; }

    [Key, Column(Order = 1)]
    public Guid SignerUUID { get; set; }

    [ForeignKey("EntityUUID")]
    public virtual User User { get; set; }
    }

    public class User
    {
    [Key]
    public int Id { get; set; }

    //Allow this column to be set as the key for signers instead of always using Id
    public Guid? EntityUUID { get; set;…

    3 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 →
    • Ship symbols (pdb) for EntityFramework 6.X

      How painful that I can't step into the EF souce code to debug an issue I'm seeing.

      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…)
        0 comments  ·  Flag idea as inappropriate…  ·  Admin →
      • mapping to in-memory OLTP Tables

        please add ability to create in-memory OLTP tables in next EF version

        151 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 →
        • SqlAzureExecutionStrategy should handle all transient Azure SQL errors

          I believe that current version of SqlAzureExecutionStrategy was developed in time of different architecture of SQL Azure (proxies handling connections). Now it does not cover some clearly transient errors, for example very common "System.Data.SqlClient.SqlException: A transport-level error has occurred when receiving results from the server. (provider: Session Provider, error: 19 - Physical connection is not usable)". See http://stackoverflow.com/questions/25998625/why-does-sqlazureexecutionstrategy-not-handle-error-19-physical-connection-i/30894154#30894154

          3 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 →
          • sp_fkeys

            Using code first, when you try to apply "update-database" and you receive the message: "Could not drop object 'dbo.Table1' because it is referenced by a FOREIGN KEY constraint."

            The message should show the result of the command "sp_fkeys", then easily the developer can identify the keys to remove.

            1 vote
            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 →
            • Azure Storage

              I know it was said that Azure Table Storage support will come after the SQL Server support for ASP .Net 5 is done.

              I'm just saying, I still want this as soon as possible.

              1 vote
              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 →
              • Designer support for specifying Interfaces for Entities

                I have an interface that a lot of my entities support.

                interface Audit
                {
                DateTime CreatedAt,
                int CreatedBy,
                DateTime ModifiedAt
                int ModifiedBy
                }

                It would be nice to be able to mark Entities as supporting this interface in the designer.

                See also http://stackoverflow.com/questions/4093897/interface-inheritance-in-entity-framework

                4 votes
                Vote
                Sign in
                Check!
                (thinking…)
                Reset
                or sign in with
                • facebook
                • google
                  Password icon
                  I agree to the terms of service
                  Signed in as (Sign out)
                  You have left! (?) (thinking…)
                  0 comments  ·  tools  ·  Flag idea as inappropriate…  ·  Admin →
                • Support json linq queries

                  As MS is adding json support to Sql Server 2016 it would be great if EF could support this with linq queries and convert a tree with arrays to nested lists.

                  9 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 another Entity as a Key

                    Since all entities require a key, declaring an entity 'A' as a key in another entity 'B', EF could lookup the key for that entity (A), and use it as the key for this entity (B) too. This keeps the model classes in .NET "clean" in the sense they don't need to duplicate they key field. E.g.

                    class A {
                    string Key { get; set; }
                    }

                    class B {
                    A Key { get; set; }
                    //Not required, since A has a key defined on it already, and our key is of type A
                    //string KeyWhenPersistedToARelationalDatabase { get; set; } …

                    1 vote
                    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 →
                    • The "dnx . ef migration add initial" command of ASP.NET 5/EF 7 should generate columns in the right order

                      The "dnx . ef migration add initial" command of ASP.NET 5/EF 7 should generate columns in same order as the properties appear in the entities.
                      Currently they are in alphabetical order.

                      2 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 →
                      • Customize ModelObjectItemWizard to be able to add new items

                        I want to be able to customize Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.ModelObjectItemWizard
                        So I can add my custom items to Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.Gui.ModelBuilderWizardForm like I show on this updated screenshot
                        http://clip2net.com/clip/m407107/8fb72-entity-framework-wizard-customization2-35kb.png?nocache=1

                        In particular I want to add "ASP.NET Identity 2.0 EF Designer model" which will already contain all the entities required for ASP.NET Identity 2.0 to work.

                        18 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 →
                        • Change schema for dbContext pre connection

                          Build one model from code first and then use new TennantContext(connection, schema).

                          Exactly as HasDefaultSchema but possible to change with new connection.

                          No migrations and no other special features needed.

                          Lets say I have users data stored in one DB but in different schemas (each user has own schema). I have 1000+ of users, every model for every user is cached by IDbModelCacheKeyProvider is RAM kill.

                          P.S. Alter user set default schema is not a solution

                          Thanks

                          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 →
                          • Make Data Annotations more flexible to use and to customize

                            DataAnnotations are only really useful when the rules and the error messages can buble the whole way up to the ui. Some modern ui frameworks already make use of this - e.g. Breeze. But DataAnnotations are just not as flexible as we need them. Some known problems are:

                            - you can define your own error messages within the DataAnotation - but those are not easy to localize. To my mind the decission about displaying the content error message should be left to the client. As the client could possibly be a web page, a smartphone or even a coffee machine…

                            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 →
                            • Custom identity generator support

                              I'd like to have a custom identity generator support which would allow more advanced ID generation like HiLo-generator (or even sequence based hi/lo ID gneration). This would (for example) help reducing the amount of database accessed/communication which should result in a speed up when adding a batch of new records through EF.

                              3 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 →
                              • 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 →
                                • AsNoProxy()

                                  I would like to be able to query for a set of Entities and not have it return Proxies on a one off basis

                                  3 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 →
                                  • UseSQLite() / UseSqlServer() / UseInMemoryStore() / UseAzureTableStorage() .... is this the right approach?

                                    I've been following the very interesting EF7 presentation on Channel 9.

                                    In that presentation, provider specific code was used to address different kinds of data storage.

                                    I'm used to code as provider agnostic as possible and have any connection details stored in configuration, not code. The current EF7 approach, however, appears to result in spaghetti (= too many "if" = [I]talian [F]ood).

                                    Hence, I suggest to omit the requirement for these calls and shift provider selection back to the configuration file.

                                    This would result in the following strategy:

                                    Using dependency injection, Microsoft (and others) may provide NuGet packages for each…

                                    2 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 →
                                    • Since EDMX will not be supported anymore.... How do use T4 templates in other projects in the same solution??

                                      I use the EDMX file geneated by EF to generate classes and code in other projects in the same solution..... I do this by using T4 templates that read the EDMX.... How will I be able to do this if no EDMX is available????

                                      1 vote
                                      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 →
                                      • Better syncing for 'update model from database'

                                        If I have a database-first model, add a new db table then use "Update model from database" the wizard shows the new table and it is added to the model just fine

                                        If I delete that table and update again, the table shows on the 'Delete' tab of the wizard but after clicking 'finish' the object still shows on the edmx diagram and the table's class file is still in my project. The only way to cleanup is to manually edit the edmx and delete the class files.

                                        This is a problem for maintenance because for eg. I might not…

                                        1 vote
                                        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 →
                                        • Allow interception of the creation of dynamic proxies

                                          At the moment, the creation of a dynamic proxy for a POCO class is an internal process. I'd like to be able to intercept this proxy creation event (possibly through the service locator) in order to be able to emit additional properties / methods into the dynamic proxy class or to customize the functionality of the existing change tracking / lazy loading code.

                                          9 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 →
                                          ← Previous 1 3 4 5 18 19
                                          • Don't see your idea?

                                          Entity Framework Feature Suggestions

                                          Feedback and Knowledge Base