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. 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…

        505 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,335 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,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…)
                      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.

                    • Right click on design area to have 'templates' for database/tables

                      I wish to have right click of empty design area to have templates of database/tables like "Employee", "Students", "Family Hierarchy", etc.

                      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  ·  tools  ·  Flag idea as inappropriate…  ·  Admin →
                      • Mapping single model to multiple databases

                        Like to be able to build a domain model over data in multiple databases. With out having to manage database objects - linked servers, views etc.

                        1,615 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…)
                          31 comments  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →
                        • IObjectSet .Find() Medhod

                          IObjectSet .Find() Medhod

                          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 →
                          • Synonym Support

                            The ability to create an entity for a synonym in the database.

                            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  ·  tools  ·  Flag idea as inappropriate…  ·  Admin →
                            • Encryption of Columns

                              Would be nice to be able to map encryption to a column. have a convention based or override using a
                              function (Func<>).

                              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  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →
                              • Add polymorphic associations support

                                Add support for polymorphic associations like <any> and <many-to-any> in NHibernate.

                                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…)
                                  0 comments  ·  Flag idea as inappropriate…  ·  Admin →
                                • 807 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…)
                                    16 comments  ·  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();

                                    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…)
                                      3 comments  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →
                                    • Add stored proceddures to data sources window

                                      Stored procedures can be included in an EDM. It would be most useful if a proc's result set were available for drag and drop from the Data Sources list such as tables currently are.

                                      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  ·  tools  ·  Flag idea as inappropriate…  ·  Admin →
                                      • Support for hierachical queries and HierarchyID

                                        One of the things that most simple business applications require is heirarchy. Whether it be a tree for data selection or a threaded comment set, Heirarchy is horrible to implement in EF and LINQ - I'd like to see methods that support it better.

                                        328 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 →
                                        • Define RelatedProperty on an inherited foreign key

                                          Allow mapping to entity in a derived class based on a property in base class.

                                          Normally, we create a [RelatedTo] property for a foreign key defined in the same class.

                                          But it would be quite handy to be able to define [RelatedTo] on a Foreign Key defined in the base class.

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

                                          Entity Framework Feature Suggestions

                                          Feedback and Knowledge Base