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 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. Support for compact frameworks

    support for .net CF 3.5 and 3.7 please...

    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 for Linked SQL Servers

      Add support for Linked servers.

      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…)
        1 comment  ·  Flag idea as inappropriate…  ·  Admin →
      • Support for timestamp in model-first

        You cannot use optimistic concurrency in model-first mode. This is because the entity designer does not support a timestamp type. Even if you add a timestamp column and update your model, it turns into binary(8) in the generated SQL. Manual changes to set the type to "timestamp" in the EDMX file are overwritten and the property reverts to Binary(8).

        As far as I can tell, this makes it impossible to use this feature in model-first mode.

        14 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 →
        • 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  ·  tools  ·  Flag idea as inappropriate…  ·  Admin →
          • Ability to specify NoLock and other query hints

            Table lock, update lock ( WITH(UPDLOCK) / FOR UPDATE ).
            LockMode something like NHibernate.

            Also should support controlling parameter sniffing

            http://stackoverflow.com/q/9890699/85196

            235 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…)
              7 comments  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →
            • 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 →
              • Weak references in the object context

                Weak references would allow the context to cache objects but allow the caller can use a single context without wasting memory.

                Example:
                An embedded device where there is no clean unit of work. When something is loaded into the device it must process it, and when that something is done the user may remove it at some later point. It processes many somethings simultaneously, up to maximum capacity.

                For now, we either use NoTracking objects or create a context for each object. This induces a lot of unnecessary overhead.

                A weak reference would mean one context, no memory growth, but…

                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 →
                • Some more extension points to support I

                  A way to set a ServiceLocator into the DbContext, so that EF can materialize the POCO with parametered constructors.

                  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 →
                  • A Collection which automatically sets the parent property on add

                    class Product {
                    Category Category;
                    }
                    class Category {
                    [ParentProperty("Category")]
                    ParentHashSet Products
                    }

                    var prod = new Product();
                    var cat = new Category();

                    cat.Products.Add(prod);
                    Assert.AreEqual(cat, prod.Category);

                    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  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →
                    • ColumnAttribute to set the name of a navigation property backing onto a real column

                      [Column("OwnerId")]
                      public virtual User Owner { get; set; }
                      some interest was expressed by the team on this so it may be in...

                      5 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 →
                      • 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  ·  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 →
                          • 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 →
                            • Offer an in-memory provider to use as test double / fake database

                              Instead of having EF connect to SqlServer or Oracle or whatever ... have the ability to provide an InMemory provider ... so our unit tests or general development can be quick. There's no .dbf or whatever. No triggers or stored procs or views. Just list or hashset backing collections (behind the scenes). Simple, yet fast.

                              Example scenario's.

                              The common : Blog posts and Users. When a person creates a new blog post (which is represented as an entity on the edmx) and adds a User to that blog post, (ie. the user who is making the post), the inmemory context…

                              514 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  ·  tools  ·  Flag idea as inappropriate…  ·  Admin →
                              • Add row_number() support

                                Please add row_number() support. Need it in paging scenarios when we need to find a page to which entity belongs

                                28 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 →
                                • Built-in entity auditing!

                                  EF should have some better data change tracking/auditing plumbing...on par with the extensive trace listener class support in ASP.NET. In order to create an audit history of the CRUD actions taking place within my entity model in EF 4.0, I had to write a lot of custom code and override the SavingChanges event and the OnContextCreated method to make it happen. Even now it doesn't properly catch all actions due to certain limitations (such as having DB-set identity fields). Think about how to make auditing data changes simpler and richer for devs!

                                  31 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 →
                                  • DbDatabase.SetInitializer to take a delegate

                                    e.g.
                                    DbDatabase
                                    .SetInitializer(c => {
                                    // do my stuff
                                    }));

                                    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 repositories and units of work

                                      I'd like to see a well designed EF project template that made use of the Repository pattern for abstracting the data access technology. This should showcase best practices for using Code-First and POCO entities, UnitOfWork abstractions, solutions for querying entities that span multiple repositories, etc. This information is pretty hard to come by for EF but available in abundance for other ORMs.

                                      66 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 →
                                      • Unique Constraint (i.e. Candidate Key) Support

                                        SQL Server and other databases support Unique Constraints on tables. Foreign key constraints are generally based on unique constrains on the principal side, with the Primary Key being only a special case of a unique constraint.
                                        The Entity Framework currently only supports basing referential constraints on primary keys and does not have a notion of a unique constraint. The idea is to have:

                                        • Support for specifying a unique constraint on an Entity
                                        • Support for specifying a foreign key associations that on the principal end specify columns(s) that comprise a unique constraint but are not the primary key,

                                        3,417 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…)
                                          58 comments  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →
                                        • Improved SQL Generation

                                          I have seen simple select statements with 4 or 5 includes result in nearly 5000 line SQL statements when an equivalent hand-written SQL statement is ~15 lines. The performance of these queries along with the readability when debugging makes it an area that I would like to see the EF team focus on improving.

                                          2,530 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…)
                                            27 comments  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →

                                            The update for the core EF libraries that will be included in .NET 4.5 will include some improvements in SQL generation. However not all the scenarios mentioned in the comments will be addressed.

                                            I am going to leave this idea as open for now, until we figure out a better way to track individual scenarios, which we need to do to get more actionable data.

                                          • Don't see your idea?

                                          Entity Framework Feature Suggestions

                                          Feedback and Knowledge Base