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. Change schema for dbContext pre connection

    Build one model from code first and then use new TennantContext(connection, schema).

    Exactly as HasDefaultSchema but possible to change with new connection.

    No migrations and no other special features needed.

    Lets say I have users data stored in one DB but in different schemas (each user has own schema). I have 1000+ of users, every model for every user is cached by IDbModelCacheKeyProvider is RAM kill.

    P.S. Alter user set default schema is not a solution

    Thanks

    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  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →
    • Provide Refactor Into Existing Complex Type

      In the designer we can Refactor Into New Complex Type, but once we have done this we cannot Refactor all other instances into Existing Complex Type.

      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  ·  tools  ·  Flag idea as inappropriate…  ·  Admin →
      • Foreign key (from attribute and fluent) without navigation property

        Right now you have to define a navigation property set a foreign key constraint on a column.
        For people that want to achieve some independence from EF (using the repository pattern, for example, and a key-value store as a possible alternative), plainer POCOs with just ids are important.
        For example, with the repository pattern, I am right now able to use the same data classes and the same IRepository for an EF backed data store and a Redis-backed one.

        Defining a foreign key without the navigation property is still important and useful for data integrity.

        If could be something like …

        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  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →
        • create an secondary index from edmx designer tool for generate database

          when create a database from model some times need create secondary index for restrict some case of data

          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  ·  tools  ·  Flag idea as inappropriate…  ·  Admin →
          • Make Data Annotations more flexible to use and to customize

            DataAnnotations are only really useful when the rules and the error messages can buble the whole way up to the ui. Some modern ui frameworks already make use of this - e.g. Breeze. But DataAnnotations are just not as flexible as we need them. Some known problems are:

            - you can define your own error messages within the DataAnotation - but those are not easy to localize. To my mind the decission about displaying the content error message should be left to the client. As the client could possibly be a web page, a smartphone or even a coffee machine…

            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  ·  Flag idea as inappropriate…  ·  Admin →
            • Support read-only mapping to tables without key

              Allow mapping of database views without requiring the Key Attribute

              When mapping entitis to Views, it´s common that no Key can be set, bescause the view does not provide it and you can´t map it. The idea is:

              * Make it possible to map to Views (or tables) in a read only fashion that does not require the Key Attribute

              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  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →
              • DbContext.Database Interface

                Please please please....

                Can we have DbContext.Database Interfaced so that we can unit test our EF code first operations on DbContext.Database

                thanks!
                Dean

                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  ·  Flag idea as inappropriate…  ·  Admin →
                • 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  ·  Flag idea as inappropriate…  ·  Admin →
                  • Create method should initializer collection navigation properties

                    I've found that in Code First entities, my "many" properties such as

                    property List<People> SomePropertyName {get; set;}

                    are null when the entity is instantiated. This breaks the common "convention" of just simply adding entities to the list:

                    You can't just
                    MyEntity.SomeManyProperty.Add(SomeOtherEntityInstance);

                    You have to do
                    MyEntity.SomeManyProperty = new List<SomeOtherEntity> { SomeOtherEntityInstance };

                    but, of course, you can't just do that, because you might wipe out an existing list, if there is one, so you must then do a check first. Ugly.

                    As a lesser evil, I've resorted to instantiating empty lists in the constructor of my entities but this is…

                    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…)
                      5 comments  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →
                    • Optional Convention that assigns Default Value to not nullable types

                      When using code first with an existing database, the "can not assign null to a non nullable type" exception can be realy painfull, because the compiler gives no warning, when i project a int? to a int.

                      It would be very usefull to have a Convention / Configuration that enables the automatic use of GetValueOrDefault for these cases.

                      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  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →
                      • Support for generic complex types

                        You should support for using generic complex types. Consider scenerio where I would like to create Rage<T> type. Now I must create RangeOfInt32, RangeOfInt64, RangeOfDecimal, etc. It will be also great if that class could be defined outside of the model.

                        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  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →
                        • Cross Model Navigation Properties

                          I've read http://blogs.msdn.com/b/adonet/archive/2008/11/25/working-with-large-models-in-entity-framework-part-2.aspx

                          but, it's a total mission and I haven't had enough time to get it working. I'd like to add an association which bridges two models using the designer. Both models contain tables from the same database.

                          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 →
                          • Sort and autoformat xml inside .edmx files before saving via EF Designer

                            Need the EF designer to generate nodes inside .edmx file in exactly the same order they are present in the database (currently a list of entity properties is saved in reverse order in mappings section, also when you update the model from the database schema the ordering is messed up). Also before saving .edmx file EF Designer should auto format the document. This would help significantly with branching, merging and resolving conflicts during merge operations of .edmx files.

                            Steps to reproduce: (1) Generate EF data model based on an existing database (2) Add a couple of new columns, indexes, foreign…

                            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  ·  tools  ·  Flag idea as inappropriate…  ·  Admin →
                            • Designer support for user-defined functions (UDFs, including scalar-valued functions)

                              Scalar function is used usually some custom function to retrieve some only one value.
                              eg.custom ID not Guid

                              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…)
                                1 comment  ·  tools  ·  Flag idea as inappropriate…  ·  Admin →
                              • support for ordering in Include()

                                using the include() with a 1 to many relationship, the data are loaded in the list without any specific order, forcing often to reload directly specifying the sort order

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

                                  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 →
                                  • Update with Where Clause

                                    We should be able to update with a where clause.

                                    For example, you have an entity named "Product" that is bound to a "User". You want to be sure that the update is done on the product that you have your new values but also to the current user when the product is saved. Normally, in SQL we do a Update statement on Product table by setting new values to the product (where clause). What is missing is the ability to also add a AND statement to add the User Id. This way, we can be sure that the entity…

                                    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  ·  Flag idea as inappropriate…  ·  Admin →
                                    • User Definable Attribute on Entities and Navigation Properties

                                      Can we have the ability to add user defined meta data to entities and properties so that we can pick up on these using T4 Templates. One such example is in the DataMemberAttribute, this takes a priority in the constructor it would be nice to be able to add this as a metadata value on a property, we need this so that we can use entities both in WCF and RIA Services, at the moment we have hijacked the summary field for this purpose.

                                      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 →
                                      • 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 →
                                        • Migrations: Allow Multiple Migration SQL Generator per Provider

                                          One way to allow community to contribute to EF Migrations is allow us to create more `MigrationOperation`s.

                                          For example, people can then add things like full text index, etc., things that are not in the core EF Migrations and are just boring SQL statements that need to be combined together.

                                          Currently, to build a provider agnostic `MigrationOperation`, you need to write the SQL generated for the operation in a class derived from `MigrationSqlGenerator`. If you want to add `CreateFullTextCatalog` operation and support SQL Server for example, you inherit `SqlServerMigrationSqlGenerator`, add a `Generate` method for your operation, and ensure all other…

                                          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  ·  Flag idea as inappropriate…  ·  Admin →
                                          1 2 9 11 13 17 18
                                          • Don't see your idea?

                                          Entity Framework Feature Suggestions

                                          Feedback and Knowledge Base