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. 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 →
    • Provide EF Code-First migrations support for one DbContext but multiple shard databases

      I have a DbContext that is initialized with a connection string in its constructor. Each connection string points to a database that has the same exact schema as any other and is treated as a unique shard of a SQL farm.

      I want to be able to add migrations once and update all databases with ease. This is particularly useful for web applications that need to scale out their DB layer.

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

          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 →
          • 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 →
              • Allow indexers in LINQ queries

                Let us access indexers in the LINQ queries... Why do I need to save named POSTed data to an intermediate variable before I use it once to query the database? It worked fine in LINQ 2 SQL, and I have been waiting for it to be fixed since EF4.

                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 →
                            • 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 optional complex type

                                For example: Class Foo has a property named Bar and that property is a reference to the complex type ComplexBar. It would be great if Bar could be left null in cases when a "user/whatever" does not have any ComplexBar information. The benefit is that ComplexBar can have required properties and other validation that only applies when the property Bar is not null. If it is null then that validation is not triggered because it does not apply. If I want Bar to always have a value then I can flag it as required, and it will behave like complex…

                                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 →
                                • Improved Table Per Concrete Type Performance

                                  Like the TPT improvements, seeing improvements to concrete types would be great.

                                  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 →
                                  • Allow entities from one CSDL/Context to exist in more than one namespace

                                    For large models, say with 100+ entities, I'd like the ability to better model the domain by breaking up the entities into packages (modules). Other frameworks support this. Even SQL Server allows tables to be broken out into different schemas for manageability only to be mashed into one namespace when modeled by 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 →
                                    • mearge all EF flavor (modle firest , code first ) so the generated code is the same

                                      this leads to 2 development roads , one might have feature that the other don't , i mean :
                                      model first store the relation and mapping in XML file and load it at run time ,
                                      where code first uses convention or data annotation or fluent API
                                      code first have data annotation , migration , where model first don't .
                                      could we make both generate code first way ?

                                      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 →
                                      • Better error message for "The cast to value type ... "

                                        It would be very usefull to get the name of the corresponding property or fieldname that causes the "The cast to value type 'System.Int32' failed because the materialized value is null...." exception.

                                        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 →
                                        • Persist/Query Calculated Properties (read-only)

                                          This is a very useful feature that is supported in NHibernate. Given this property in the Order Entity:

                                          public decimal OrderTotal
                                          {
                                          get { return Items.Sum(o => o.Total); }
                                          }

                                          EF should persist this "read-only" property which can also be used in LINQ queries.

                                          var results = from order in DbSet<Order>
                                          where order.OrderTotal > 100
                                          select order;

                                          I believe a current work around is to include an empty protected setter but that has code smell all over it.

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

                                          Entity Framework Feature Suggestions

                                          Feedback and Knowledge Base