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. Richer collection support, including ordered collections and dictionaries of value types

    It would be very nice to be able to support properties which are collections of value types. Just to have an array of doubles I shouldn't need to map each value to a class. NHibernate has this feature. E.g.
    class Benchmark
    {
    public long Id {get; set;}
    public string Name {get; set;}
    public IDictionary<DateTime, double> Returns {get; set;}
    public int[] Vector {get; set;} // preserve the order too
    }

    141 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…)
      6 comments  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →
    • Code First support for user defined functions (UDFs)

      Similar to adding support for stored procedures in Code First, but for functions also.

      Using model first, this is supported and using EdmFunctionAttribute they can be used from LINQ to Entities. I really miss this in the Code First approach.

      See also: http://data.uservoice.com/forums/72025-ado-net-entity-framework-ef-feature-suggestions/suggestions/1607971-code-first-support-for-stored-procedures?ref=title

      124 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 →

        UPDATE: Reverting status from “under review” to “no status” since we aren’t currently working on this. We will still consider it for future releases.

        UPDATE: EF6 now supports mapping stored procedures for CUD operations. More complete function support in Code First was postponed for schedule reasons.

        The plan is to add support in Code First for all the same kind of functions that are supported by the core runtime, including stored procedures, user defined functions, and table valued functions.

      • Flexible stored procedure support: return values and output parameters

        Support Stored Procedure Return Values, output parameters of any type and procedures that don't return a result set, like an update statement.

        109 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  ·  Flag idea as inappropriate…  ·  Admin →
        • Mechanism for statically defining eager loading for navigation properties

          Some times, depending on how you design your model, you want a certain navigation property to be loaded *always*. It's static part of the model just like the (implicit) lazy load nature of a virtual navigation property when lazy loading is configured.

          There should be a way to define eager load for navigation properties, something like:

          [Include]
          public ICollection<Item> Items { get; set; }

          and/or via DbModelBuilder:

          modelBuilder.Entity<Order>().Property(x => x.Items).Include();

          This would greatly simplify client code as it wouldn't have to include on each query/access, and it would also work with Find(key). This would make it more suitable to DDD-style…

          95 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 →
          • 93 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…)
              2 comments  ·  Flag idea as inappropriate…  ·  Admin →
            • Designer support for editing store model

              The EF designer only allows you to edit the model, not the store. This means the EF designer only contains 50% of the functionality required to actually do model-first development. Without being able to add tables, views, stored procedures, and constraints there is nothing to map your entity properties to.

              The only alternative way is to "Update model from database...", but it forces you to create entities for the tables you import, when all you really want is for you tables to be listed in your store and available to be mapped to. Furthermore, if a table in the DB…

              93 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 →
              • SQL Variant support

                I would like EF to support sqlvariant columns like Linq to SQL does

                90 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…)
                  2 comments  ·  Flag idea as inappropriate…  ·  Admin →
                • Update delete and insert tables directly using expressions and predicates (aka LINQ-like DML, aka set-based updates)

                  Allow for direct updates to the database using expressions.

                  Here is an example, but it only works with constants.

                  A real solution needs to be able to evaluate expressions, which could translate into nested SQL queries.

                  http://geeks.ms/blogs/unai/archive/2008/07/17/multiple-entity-updates-with-entity-framework-ef-fetch-updates.aspx

                  85 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 →
                  • Hooks to intercept and modify queries on the fly at high and low level

                    We have seen that there are lots of discussion surrounding the generated SQL not being optimized. Entity Framework should have a provision wherein User should be able to change the Generated SQL and use it for further processing through some mechanism

                    83 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…)
                      5 comments  ·  Flag idea as inappropriate…  ·  Admin →

                      EF6 added initial support for interception, which exposes events for query interception. Currently only access to store DbExpression trees and DbCommand are available, but interception at different levels should become possible in the future.

                    • WAQS

                      Adopt the WAQS framework into EF source code

                      WAQS framework is a layer of abstraction over the Entity Framework

                      WAQS is addressing many of the painful scenarios under EF, with a great design and productivity.

                      http://www.dailymotion.com/video/xuc1jb_waqs-application-scaffolding_tech

                      80 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 →
                      • Allow using SQL Server 2012 sequence for generating primary key

                        I would like support for SQL Server 2012 sequences to generate PK instead of identity. Coming from Oracle this is very important for me. See http://lennilobel.wordpress.com/2011/05/23/using-sequences-in-sql-server-denali/ for adding the DEFAULT consraint with NEXT VALUE FOR from a sequence.

                        79 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  ·  Flag idea as inappropriate…  ·  Admin →
                        • Designer support for data annotations

                          As I found in CSDL format description there is a possibility to extend model by Annotations.
                          I know annotations with unique identities for every metadata entity (and property) can solve renaming problem without drop and recreating entities (or properties).
                          For example: in custom ddl provider (wanted ability to write it) could write this identities in extended properties (Sql Server) or in comments table (Oracle). Then, during upgrade it will be easy to found things that was renamed, deleted or added. Of course if providers upgrade method will have both models in signature.

                          75 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…)
                            9 comments  ·  Flag idea as inappropriate…  ·  Admin →
                          • Detach entire object graphs

                            I would like the option to detach an entire loaded object graph easily using the DbContext API. And to attach the graph again with several option for choosing if existing data should be overwritten or not.

                            72 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 →
                            • Allow dynamically adding properties to entities and complex types

                              want to use the entity framework. However I also have the requirement of allowing my users to define custom fields in our system. I would like to still use the entity framework and not use a a partial class with a hash table property.

                              69 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…)
                                2 comments  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →
                              • Reverse engineering should generate XML documentation from SQL description fields

                                When generating from database, the EDMX designer should generate XML Documentation (Summary field) from the SQL Description field of each table/column etc.

                                68 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…)
                                  10 comments  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →
                                • API for checking database schema correctness

                                  I would like some API for checking if database schema is correct for edmx storage model.
                                  It could be something like

                                  List<string> errors = new List<string>();
                                  bool isCorrect = context.ValidateDbSchema(errors);

                                  68 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…)
                                    2 comments  ·  Flag idea as inappropriate…  ·  Admin →
                                  • ObjectContext DiscardChanges

                                    We need an easy way to give the user the "Cancel" functionallity when he make changes to entities data but he does not want to save changes pressing Cancel button. I think adding DiscardChanges to ObjectContext is the solution, going back to its initial state and dissapearing added entities (even child entities) and returning modified or deleted entities to their original state

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

                                      64 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 →
                                      • Ability to map any serializable object to XML or binary columns

                                        For example a database table could have a [Settings] column of type xml. And a mapped entity type could have a property [Settings] of some serializable type. Then you will be able to read and write data into and from this [Settings] column with EF. Like this:

                                        var user = db.Users.First(x => x.ID == 1);
                                        if (user.Settings == null)
                                        {
                                        user = new Settings();
                                        }
                                        user.Settings.ProductsPerPage = 20;
                                        db.SaveChanges();

                                        63 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 →
                                        • Allow Complex Types to Reference Entities

                                          While not quite an edge case, it is possible in our designs to have complex types refer to entities, but EF does not support this case whereas NHibernate does. Since a complex type maps back to the table of a containing entity there does not appear to be a technical reason why this could not be added. More rationale can be found in this post: http://stackoverflow.com/questions/7012319

                                          57 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…)
                                            2 comments  ·  Flag idea as inappropriate…  ·  Admin →
                                          • Don't see your idea?

                                          Entity Framework Feature Suggestions

                                          Feedback and Knowledge Base