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. 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 →
    • 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 →
      • Provide means to clear the database

        Provide a method on the Database class to remove all data from the database without knowing anything about the underlying physical database schema, relationships and constraints.

        This is critical in order to effectively test EF related code. While one way is to recreate the database every test, it has security and performance implications.

        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 →
        • EF ODBC Support

          I have seen NHibernate have the capability to connect ODBC data source. I could not do that in EF now. I want to connect Informix through EF with ODBC Driver. I did not want to use Informix data provider for this type of setup.

          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 →
          • [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 →
            • Auto Create CRUD stored procedure

              EF should have the ability to automatically create basic CRUD stored procedures for every table. These basic CRUD stored procedures will only focus on a single table and all it's columns.

              An advanced feature would be the ability to auto generate CRUD stored procedures that take into account parent and child tables or many to many scenarios, etc.

              Other features would be to create stored procedures that allow for paging and streaming of large amounts of data. Say you have a web page that list contacts and you want ot show the 10th page. It would be ice to autogenerate…

              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  ·  tools  ·  Flag idea as inappropriate…  ·  Admin →
              • Property to inform when entity is being materialized

                If you perform business logic in the entitys OnPropertyChanged event handler, eg. calculating some related properties or changing a state property when certain properties are changed, your code is also run when the entity is fetched from the database. This is not a real change of the entity, it is just being loaded. It would be nice if the EntityObject class had a property bool IsMaterializing that was true so you could break out of the OnPropertyChanged handler.

                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 →
                • Upgrade model to include FK

                  I'd love a tool for upgrading the model from version 1 to version 4.

                  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  ·  tools  ·  Flag idea as inappropriate…  ·  Admin →
                  • Provide an Entity Framework Factory similar to the ADO.Net Provider which allows easy swapping betwe

                    Provide an Entity Framework Factory similar to the ADO.Net Provider which allows easy swapping between different Entity Framework models such as SQL Server, Oracle, MySQL, DB2 etc. simply by providing the appropriate database provider information in a manner similar to the current ADO.Net Database Provider Factory.

                    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 →
                    • Add attribute for federated tables

                      Add a "FederatedOn" attribute to the "Table" data annotation so Code First entities can be associated to a SQL Azure Federations federated member. For instance: [Table("Pessoas", FederatedOn = "TenantId=TenantId")]
                      As an alternative, allow an equivalent attribute to be declared on the entity property that is the federation distribution key (e.g. the TenantId property).

                      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  ·  tools  ·  Flag idea as inappropriate…  ·  Admin →
                      • Improve conditionals on Table-per-Hierarchy

                        It never works when your conditionals are based on a int column so where Type=1 etc. Only seems to work for when some column Is Null. It complains about mapping when you try and do this. Seems impossible to work around

                        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 inserting new entities with predefined identity column values (INSERT_IDENTITY)

                          Especially for migration projects it would be useful to allow entities to be saved with predefined identity values.

                          Until now you have to use ADO.NET to do this.
                          SET IDENTITY_INSERT TableName ON
                          INSERT INTO TableName (IdColumn, Column1)
                          VALUES (234, 'Value')

                          I would like to tell the DbContext to use this feature when saving new entities.

                          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 →
                          • Partial SaveChanges

                            Should be able to SaveChanges of certain entities while leaving the other entities in Added etc. mode, this is useful when you want to save data in a page that some other parts of the page contain invalid data that can't be saved.

                            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 →
                            • Cascade Delete and Update Attribute

                              It would be great to have attributes to indicate whether to cascade delete and updates rather than having to use the fluent api.

                              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 →
                              • Better support for mainframe databases like DB2

                                Please add support for connecting to and using mainframe databases like DB2. We can't wait for IBM to get their act together and produce a usable EF provider.

                                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  ·  tools  ·  Flag idea as inappropriate…  ·  Admin →
                                • Create a convention to automatically convert null string properties on a model to empty strings

                                  Create a convention to automatically convert null string properties on a model to empty strings

                                  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 →
                                  • Database VIEW creation support and specific mapping of entites to views.

                                    Currently, to get Code First to create a database with a VIEW, the CREATE VIEW sql statement must be hacked a couple of Context.Database.ExecuteSqlCommand's. One to drop the table that EF created for the entities you're mapping to it and another to create the view using the same name as the table EF assumes is still there.

                                    When mapping an entity to a view, you have to use modelBuilder.Entity<T>.ToTable and treat the view as a table. Entity Framework assumes the view is still a table and assumes it's read/write. A new method of .ToView might be added to tell EF…

                                    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 →
                                    • get context from entity

                                      some times we need to know the context from entity

                                      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  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →
                                      • TPH should use Discriminator Expression

                                        Allow via DataAnnotation or Fluent API which column in an abstract class is the Discriminator. For example, in a Vehicle table you could identity a VehicleType [int] as the discriminator.

                                        Then in derived class (e.g., PassengerCar) you could identity what values (or set of values) distinguish the type in the table. For example, [DiscriminatorExpression("VehicleType in (1,4,7,10)")]

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

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

                                          Entity Framework Feature Suggestions

                                          Feedback and Knowledge Base