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 Disabling the Default Transaction Behavior of ObjectContext.ExecuteFunction()

    EF6 introduced a breaking change to the ObjectContext.ExecuteFunction() API causing it to start a transaction when one does not already exist. This behavior should be made optional.

    25 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 →
    • Updating the F# SqlEntityConnection Type Provider for EF 6

      The F# SqlEntityConnection Type Provider is a third way to interact with Entity framework (with the other two being an .edmx file and Code First).
      http://msdn.microsoft.com/en-us/library/hh362322.aspx

      This Type Provider doesn't support the updated low-level API changes that EF 6 requires, as far as I can tell. I'd love to have an updated version that supports the async features of EF 6.

      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…)
        1 comment  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →
      • Vastly improve LINQ translation

        LINQ to SQL is the legacy alternative to EF. EF should support almost everything that L2S always did for two reasons:

        a) to ease migration
        b) because L2S was awesome and we want EF to be as well

        Please address the issues mentioned in this post: http://scatteredcode.wordpress.com/2011/06/21/why-entity-framework-4-1s-linq-capabilities-are-inferior-to-linq-to-sql/

        I did not author it, but I found many of those attempting to migrate a bug codebase. I was forced to abandon the migration because the issues were so many.

        148 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 →
        • 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 →
          • Future Queries

            I didn´t find any topic about this, but is very important.

            Its described here: https://github.com/loresoft/EntityFramework.Extended#future-queries

            // build up queries
            var q1 = db.Users
            .Where(t => t.EmailAddress == "one@test.com")
            .Future();

            var q2 = db.Tasks
            .Where(t => t.Summary == "Test")
            .Future();

            // this triggers the loading of all the future queries
            var users = q1.ToList();

            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 →
            • Provide a way to auto-increment columns without the need for sprocs or raw queries

              Loading the object in memory and incrementing a property can cause incorrect results when concurrent transactions attempt to do the same. Using optimistic concurrency can eliminate the issue, but in high traffic scenarios, it doesn't seem feasible to reload the object and attempt to increment the property again since the other transactions will be forced to do the same. I'd like to be able to send Value = Value + 1 query to the database.

              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 →
                • Support for generic type entities

                  Pseudocode to illustrate:

                  public abstract class BaseGenericClass<T> where T : class {}

                  public class DerivedGenericClass: BaseGenericClass<Foo> {}

                  public class DerivedGenericClass: BaseGenericClass<Bar> {}

                  public DbSet<BaseGenericClass<>> genericClassDbSet;

                  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 →
                  • Support ObjectContext.Translate on joined result sets

                    We sometimes end up doing 20 or more result sets in a single stored proc. Many times, a large majority of these are to bring back a single entry for each navigation property mapping.

                    I would like to see a "wide" translate function.
                    If a query has:
                    SELECT a.*, b.*, c.*, d.*

                    I'd like to see a version of Translate that can map each row to 4 separate object types, using the assumption that all of object A's columns are first, followed by B's, etc.

                    This would greatly reduce the size of our stored procs, though there could be a…

                    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 →
                    • Generate DbSet.FindByKey method taking typesafe primary key

                      The Find method on DbSet just take a "params object[] keyValues" parameter - not very typesafe.

                      I would suggest amending the standard templates to generate

                      public static class ExtendDbSet
                      {
                      public static MyEntity FindByKey(this DbSet<MyEntity> dbSet, Guid id)
                      {
                      return dbSet.Find(id);
                      }
                      }

                      where the id parameters are generated.

                      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  ·  tools  ·  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 →
                        • 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 →
                          • 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 →
                            • Improve Database First Support

                              Code First is no match for real life situations and also Proxies create lot of runtime problems.

                              We use Dictionary<Type,object> to store Lambda Expressions that are designed to act as Filters for one type. Here is the problem, at runtime code first entity type is a dynamic type leading to following problems.

                              1. Dynamic Type implementation is hidden.
                              2. It does not support INotifyPropertyChanged
                              3. It does not allow us to inspect/validate property with partial methods which we were able to do with Database First (EDMX) Model.
                              4. CreateSourceQuery is hidden, sometimes we want to only execute Any or inspect…

                              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 →
                              • Foreign Key Constraints on Views

                                The "create/update modell from database" functions of the EF designer should support foreign key constraints on views.
                                As a result of the foreign keys we get navigation properties on the views.

                                (In Oracle database it is possible to create (disabled) foreign keys between views.)

                                13 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 →
                                • Columns' uniqueness awareness. (Unique Indexes)

                                  Several DataBases give you the possibility to create UNIQUE INDEXES, both to support Unique Constraint on it or just to ensure the uniqueness of some kind of data.

                                  In both cases, this kind of information doesn't have a proper place into the model and this makes the DbContext unable to determine the proper order of the Insert/Update/Delete commands within the commands tree.

                                  The reason is pretty clear to me, if within the same SaveChanges() you delete a row or you update a index column(s) value of a row and you add a brand new row with the same original index…

                                  12 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 →
                                  • [DefaultValue(...)] is not handled by Code First migration

                                    In a column I can add [DefaultValue] attribute, but at the end it is ignored by the migration step. Confused. Please add support for this.

                                    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…)
                                      1 comment  ·  tools  ·  Flag idea as inappropriate…  ·  Admin →
                                    • table splitting with more than two tables without one2one navigation of each object

                                      table splitting is fine if you want to splitt one table to two object. If you want to splitt it to more than two objects you need to provide one to one relationship between each object at the moment.

                                      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 →
                                      • Database First Schemas to Namespace

                                        I would like the option to separate Entities base on schema, e.g. I have a single database that has two sets of tables that have the same names but are in different Schemas it would be nice to create a single data model that does this. At the moment I have to create different models for each schema is separate folder to get what I want but then I cant have relationships between them.

                                        Thanks
                                        Steve

                                        0 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 →
                                        • Better auditing interception

                                          Together will all the fabulous features you are introducing I think it could be find room also for a sort of Audit System more business oriented.
                                          We love the new Log & Interceptor hooks but we also need to pull out of the DbContext an easy POCO object based on 3 level of entities like this:

                                          (S)avedChangset (1 instance for every SaveChanges() call with at least Time, User, Application & Session Info)
                                          (E)ntities (a collection of the Entities changed within the same "Saved Changset" with at least TableName & PK)
                                          (A)ttributes (a collection of Attributes changed within the same "Entity",…

                                          10 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 →
                                          ← Previous 1 3 4 5 15 16
                                          • Don't see your idea?

                                          Entity Framework Feature Suggestions

                                          Feedback and Knowledge Base