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

      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 →
      • Query serialization / deserialization

        ** SUGGESTION **
        Native support for query serialization and deserialization (to XML) decoupled from a concrete ObjectContext, including query parametrization and correct management of lambda expressions (e.g. using expression expansion as in LinqKit).

        ** WHY **
        We've developed a set of classes that allow a query to be written in the client layer and executed in the service layer via web services (with POCO entities). After the query is written normally using linq to entities and obtaining an IQueryable<T> object, this implementation transparently does the following:

        CLIENT side:
        - Expands the query expression tree to correctly manage lambda expressions.
        -…

        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 →
        • 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 →
          • Add support for dynamically extended queries as per LinqKit

            LinqKit has shown that is possible to make the creation of queries much more dynamic, with them being composed at run time dependent on external conditions. nHibernate is good at this and LinqKit helps, but it would be nice to have an official solution.

            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 →
            • 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 →
              • 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…)
                  0 comments  ·  Flag idea as inappropriate…  ·  Admin →
                • Bulk Object Graph Persistence

                  I would like to see the ability to persist an entire object graph in one DB call. Currently it is way to chatty with the DB which makes it really slow to persist.

                  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…)
                    3 comments  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →
                  • Keep verbose naming scheme (avoid 'DbContext', etc)

                    It sounds kind of silly, I know, but one thing that is attractive about the .NET Framework is how verbose and organized it is. 'Shortcut names' like 'DbContext' and the like that we're seeing in CTP4 are really annoying, because they make me look back at other languages where you sit down to read the code and half of it feels like a poorly written text message.

                    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  ·  tools  ·  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 →
                      • Add the ability to persist TimeSpan values (and others) as strings

                        The immediate need is to be able to map between TimeSpan values on the CLR side and their equivalent string representations on the database side.

                        Currently TimeSpan can only be mapped to the SQL time datatype, which does not make much sense since the time SQL type is meant for storing time-of-day while TimeSpan is meant to represent an arbitrary amount of time. Mapping between the two limits the TimeSpan to a 24 hours interval, which rarely makes sense.

                        In our current DAL we do this by persisting TimeSpan values as strings, calling TimeSpan.ToString() on the way down and TimeSpan.Parse()…

                        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  ·  Flag idea as inappropriate…  ·  Admin →
                        • Allow stored procedures to be used to navigate relationships

                          There are many developers who are in shops that don't allow non-stored procedure calls to SQL Server. It would be really nice if there was something in EF where we could select a relationship in the EF designer, go to its mapping and select a stored procedure for each role in the relationship. It might go something like this:

                          1.We would create a relationship between two entitties, say Author and Book. Both entities would be required to expose foreign keys (the developer can make them private if they want).
                          2.A stored procedure would be created that would navigate from each…

                          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  ·  Flag idea as inappropriate…  ·  Admin →
                          • Provide Refactor Into Existing Complex Type

                            In the designer we can Refactor Into New Complex Type, but once we have done this we cannot Refactor all other instances into Existing Complex Type.

                            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  ·  tools  ·  Flag idea as inappropriate…  ·  Admin →
                            • Foreign key (from attribute and fluent) without navigation property

                              Right now you have to define a navigation property set a foreign key constraint on a column.
                              For people that want to achieve some independence from EF (using the repository pattern, for example, and a key-value store as a possible alternative), plainer POCOs with just ids are important.
                              For example, with the repository pattern, I am right now able to use the same data classes and the same IRepository for an EF backed data store and a Redis-backed one.

                              Defining a foreign key without the navigation property is still important and useful for data integrity.

                              If could be something like …

                              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 →
                              • Add Language Pack's or the possibility to create your own.

                                At this moment there are no Language Pack's available for EF5. (found a link for version 4.1 but none higher)

                                As a workaround I'm implementing custom Data Annotation's on the entities.

                                It would be great if I could create my own language pack for Dutch.

                                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  ·  Flag idea as inappropriate…  ·  Admin →
                                • create an secondary index from edmx designer tool for generate database

                                  when create a database from model some times need create secondary index for restrict some case of data

                                  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  ·  tools  ·  Flag idea as inappropriate…  ·  Admin →
                                  • Support read-only mapping to tables without key

                                    Allow mapping of database views without requiring the Key Attribute

                                    When mapping entitis to Views, it´s common that no Key can be set, bescause the view does not provide it and you can´t map it. The idea is:

                                    * Make it possible to map to Views (or tables) in a read only fashion that does not require the Key Attribute

                                    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 →
                                    • Support for OPTION (RECOMPILE) on generated queries

                                      There are many scenarios where parameter sniffing in SQL server creates serious performance problems. This is very problematic with many EF generated queries, since there is no control that allows you to tell the database optimizer not to use the parameter values or cache a plan. A simple mechanism to hint OPTION (RECOMPILE) on the generated queries would solve most of these issues.

                                      A more sophisticated solution that would allow the generated sql to leverage (Optimize for Unknown) would also be useful.

                                      Parameter sniffing and the related performance problems are a very prevalent issue with SQL server and if you…

                                      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  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →
                                        • Instantiate "many" nav properties with empty list

                                          I've found that in Code First entities, my "many" properties such as

                                          property List<People> SomePropertyName {get; set;}

                                          are null when the entity is instantiated. This breaks the common "convention" of just simply adding entities to the list:

                                          You can't just
                                          MyEntity.SomeManyProperty.Add(SomeOtherEntityInstance);

                                          You have to do
                                          MyEntity.SomeManyProperty = new List<SomeOtherEntity> { SomeOtherEntityInstance };

                                          but, of course, you can't just do that, because you might wipe out an existing list, if there is one, so you must then do a check first. Ugly.

                                          As a lesser evil, I've resorted to instantiating empty lists in the constructor of my entities but this is…

                                          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…)
                                            4 comments  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →
                                          1 2 8 10 12 17 18
                                          • Don't see your idea?

                                          Entity Framework Feature Suggestions

                                          Feedback and Knowledge Base