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.

Remember that this site is only for feature suggestions and ideas!

If you have technical questions or need help with EF try StackOverflow or visit our forums.

If you want to report a bug you found in EF use the Entity Framework project page on CodePlex.

If you want to find more information about the Entity Framework go to our MSDN site.

Entity Framework Feature Suggestions

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 vote and comment on it.

If it doesn't exist, you can post your idea so others can vote on it.

Enter your idea and we'll search to see if someone has already suggested it.

  1. Suppress specific errors/warnings

    When doing "Model First" development THERE IS NO BACKING STORE. I don't want to create a phony one. I don't want a store or any mapping to one ... period. I'll deal with that when the time comes. But I should be able to model away w/o a map or store.

    Ok ... you should provide a warning ... as you do. during validation I get a raft of 11007 and 11008 "errors" and a 2062 error during compilation.

    But I should be able to suppress those warnings and errors as well.

    In Model First you do NOT specify mapping…

    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 →
    • Make objectcontext work with multiple edmx definitions

      When using a framework with seperate database tables it is difficult the keep them apart. We have to merge them for each project to make joins possible but then we have to backport each change to the original framework database. It would cleaner if you can use one objectcontext for the 2 edmx files or make sub-edmx files or include them.

      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  ·  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.
        "

        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  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →
        • Cascade Delete with Triggers

          Using triggers for cascade delete/set allows for multiple cascades on the same table where the built-in sql server cascade does not

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

            Currently strings are compared via default database collation or column collation when the comparison is translated to SQL. But they are compared to be binary equal when the code is executed in CLR.

            So adding .ToList() before .Select() may suddenly change the result of comparison. And the tests with mocked IQueryables also work differently from the database translated queries.

            Also it's sometimes required to compare strings using different collation. Currently that's only possible if you load the entire data into memory first and compare in CLR. However, even that case is troubling since there is no exact equivalent of SQL…

            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 →
            • Dynamic Mapping at runtime

              support EF for dynamic mapping at runtime via a strait-forward API for creating a table and map it to model (for Code First). this is useful for Enterprise level application such as BPMS, Felixble CMS and ...

              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 →
              • Specify order of SQL Insert/Update statements

                Sometimes we find ourselves fighting against EF's algorithm for Insert/Update statements. It doesn't always get it right, or we just want more control, which is when it would be useful to override or give "hints" to it on what should be done.

                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 →
                • I want to call LINQ to SQL wizard on click of button click. On the click of the button the LINQ to S

                  I want to call LINQ to SQL wizard on click of button click. On the click of the button the LINQ to SQL wizard will be shown from which I can generate .dbml programmatically at runtime. Same scenario I want on Entity Framework also. I think there should be provision to call EF and LINQ wizard programmatically, so that I can genrate .dbml or .edmx file on runtime

                  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 →
                  • Query from entity

                    The Query method on the DbCollectionEntry and DbReferenceEntry classes provides access to the underlying query that the Entity Framework uses when loading related entities. A similar Query method should be added to DbEntityEntry.

                    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 →
                    • 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 →
                      • Allow dependent Foreign Key properties to have a StoreGeneratedPattern of Computed

                        Allowing dep. FK properties of the model to be generated by the database is useful for activity auditing (e.g. user logged into the DB gets their employee ID attached to the record by a trigger in insert/update).

                        I understand the issues of having the DB generate the value (the value could violate the FK), but I put that on the same level as a DBA or other admin changing values that violate the FK (since the DBA or admin is likely doing the coding of the trigger itself).

                        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 →
                        • Search the Entity Model in VS Designer

                          Provide the ability to search the Entity Model from within the Visual Studio Entity Model Designer. Currently, in order to find an entity, one must scroll and navigate all over the place. If there was a search box that could take you directly to the entity, it would save TONS of time, especially if you have a lot of tables to sift through.

                          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  ·  tools  ·  Flag idea as inappropriate…  ·  Admin →
                          • 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 →
                            • Allow project-wide disabling of database generation (Database.SetInitializer( null ) for Entity Framework)

                              As is commonly known, code first database generation is not for deployment:
                              http://programmers.stackexchange.com/questions/76082/is-entity-framework-code-first-a-bit-meaningless-useless-in-production-and-what
                              and to prevent the errors when changing the database and when going to production we should use:
                              Database.SetInitializer<DbContext>( null )

                              This is results in quite a lot of additional code and management when there are many different tables / dbsets and the project is going through change. There is also the risk that you might forget one. It is especially onerous when using generic classes derived from DbContext, such as

                              public class Records<T,U> : DbContext
                              where T : Employee
                              where U : AccountInformation
                              {
                              public DbSet<T> Employees; …

                              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 →
                              • Show diagram nodes under the EDMX node in solution explorer

                                At the moment if I want to work on a specific diagram, I have to open the default diagram in the solution explorer, open the model browser, then open the diagram I'm interested in. Can we have diagrams listed as nodes underneath the EDMX nodes in solution explorer, allowing us to go straight to the diagram we are actually interested in?

                                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  ·  tools  ·  Flag idea as inappropriate…  ·  Admin →
                                • Use multiple result sets to handle Include statements

                                  Currently, EF uses a flat query in order to populate navigation property values when using eager loading via the Include statement. While this is acceptable in some (perhaps many) cases, there are a lot of cases where this produces unacceptable queries, whether from a size or performance perspective.

                                  While this performance bottleneck can be partially avoided by using LoadProperty, this is

                                  a) less expressive and more verbose
                                  b) potentially more expensive, as it requires a round-trip for every property on every entity

                                  Instead, please allow us the option of having EF generate multiple SELECT statements to address each navigation property

                                  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 →
                                  • Support of chained Transactions

                                    Support of common transaction to execute data modification instructions natively in the entity context across two or more tables in the model

                                    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 →
                                    • SaveChanges Customizations

                                      SaveChanges on the ObjectSet is such a black hole... it would nice to be able to take more control over the process. Especially as an architect trying to create an architecture around 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  ·  Flag idea as inappropriate…  ·  Admin →
                                      • Complex (struct) key properties for tables with multiple primary keys. Enabling easier search by key

                                        Some tables have more than one field included in primary key.

                                        This makes definition of generic methods that search by key hard to implement.

                                        If it would be possible to combine all database keys into one struct in model, and enable T4 templates to recognize which property is the key, template-generated repository could be much more powerful.

                                        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 →
                                        • Better integration with Mainframe datasets

                                          Better integration with Mainframe datasets: instead of screen scraping or CTG or even Host Integration Server, using a EF Provider to unlock the data in a main frame would be a huge benefit to .NET developers

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

                                          Entity Framework Feature Suggestions

                                          Feedback and Knowledge Base