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. Customize ModelObjectItemWizard to be able to add new items

    I want to be able to customize Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.ModelObjectItemWizard
    So I can add my custom items to Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.Gui.ModelBuilderWizardForm like I show on this updated screenshot
    http://clip2net.com/clip/m407107/8fb72-entity-framework-wizard-customization2-35kb.png?nocache=1

    In particular I want to add "ASP.NET Identity 2.0 EF Designer model" which will already contain all the entities required for ASP.NET Identity 2.0 to work.

    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  ·  tools  ·  Flag idea as inappropriate…  ·  Admin →
    • 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 →
      • 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 →
        • Custom identity generator support

          I'd like to have a custom identity generator support which would allow more advanced ID generation like HiLo-generator (or even sequence based hi/lo ID gneration). This would (for example) help reducing the amount of database accessed/communication which should result in a speed up when adding a batch of new records through EF.

          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 →
          • Improve performance of adding many entities to DbContext (DetectChanges, AutoDetectChangesEnabled)

            The performance hit of adding (and possibly other operations) many entities to the context is so big, that you've introduced the AutoDetectChangesEnabled switch https://msdn.microsoft.com/en-gb/data/jj556205.aspx. This increases the code complexity and leads to nasty bugs. This is not ok and should be redesigned to work fast out-of-box. E.g. by upgrading from EF5 to EF6, due to this feature, the performance of some code has degraded by many orders of magnitude

            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 →
            • AsNoProxy()

              I would like to be able to query for a set of Entities and not have it return Proxies on a one off basis

              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 →
              • UseSQLite() / UseSqlServer() / UseInMemoryStore() / UseAzureTableStorage() .... is this the right approach?

                I've been following the very interesting EF7 presentation on Channel 9.

                In that presentation, provider specific code was used to address different kinds of data storage.

                I'm used to code as provider agnostic as possible and have any connection details stored in configuration, not code. The current EF7 approach, however, appears to result in spaghetti (= too many "if" = [I]talian [F]ood).

                Hence, I suggest to omit the requirement for these calls and shift provider selection back to the configuration file.

                This would result in the following strategy:

                Using dependency injection, Microsoft (and others) may provide NuGet packages for each…

                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  ·  Flag idea as inappropriate…  ·  Admin →
                • Since EDMX will not be supported anymore.... How do use T4 templates in other projects in the same solution??

                  I use the EDMX file geneated by EF to generate classes and code in other projects in the same solution..... I do this by using T4 templates that read the EDMX.... How will I be able to do this if no EDMX is available????

                  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 →
                  • Better syncing for 'update model from database'

                    If I have a database-first model, add a new db table then use "Update model from database" the wizard shows the new table and it is added to the model just fine

                    If I delete that table and update again, the table shows on the 'Delete' tab of the wizard but after clicking 'finish' the object still shows on the edmx diagram and the table's class file is still in my project. The only way to cleanup is to manually edit the edmx and delete the class files.

                    This is a problem for maintenance because for eg. I might not…

                    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 →
                    • Allow interception of the creation of dynamic proxies

                      At the moment, the creation of a dynamic proxy for a POCO class is an internal process. I'd like to be able to intercept this proxy creation event (possibly through the service locator) in order to be able to emit additional properties / methods into the dynamic proxy class or to customize the functionality of the existing change tracking / lazy loading code.

                      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  ·  Flag idea as inappropriate…  ·  Admin →
                      • Enum Based On Table

                        I often have a table in my database with enum values in it. I would like the option to map this table as my enum instead of the way enums are currently created.

                        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 →
                        • Code First (EF6) Ignore certain properties so they aren't mapped to stored procedures

                          When mapping Properties to Stored Procedure parameters it is not possible to ignore any properties that the Stored Procedure doesn't require/isn't expecting e.g. a field that the DBMS populates. In the example below the DateCreated property is defaulted in the DBMS to the current date/time so isn't required as a parameter, but is to be shown on the blog post UI so needs to be part of the model. Ideal would be to have an IgnoreParameter option

                          public class Blog
                          {
                          public int BlogId { get; set; }
                          public string Name { get; set; }
                          public string Url { get;…

                          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…)
                            1 comment  ·  Flag idea as inappropriate…  ·  Admin →
                          • Support common BCL methods such as DateTime.Date

                            Entity Framework should support using very common BCL features such as DateTime.Date in LINQ queries. Right now this requires the use of the special TruncateTime function.

                            The problems are as follows:
                            - This feels unnatural.
                            - It also is a problem when migrating from LINQ to SQL which did support DateTime.Date.
                            - It makes moving code across LINQ providers harder (e.g. move a piece of code from LINQ to objects to EF in order to remote it to the SQL Server)

                            Other common features should be supported as well. For example DateTime.Year or TimeSpan stuff.

                            Some are already supported such…

                            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  ·  Flag idea as inappropriate…  ·  Admin →
                            • Convert.Toint

                              Allow some sort of way to cast columns, like "MyContext.MyEntitys.Where(e=>Convert.ToInt(e.GenericStringField) == 10",
                              and the SQL would be
                              "Select * from table where Cast(GenericStringField as int)=10"

                              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…)
                                1 comment  ·  runtime  ·  Flag idea as inappropriate…  ·  Admin →
                              • Global improvement of error messages

                                Errors have to be much more specific. For example.

                                The operation failed: The relationship could not be changed because one or more of the foreign-key properties is non-nullable. When a change is made to a relationship, the related foreign-key property is set to a null value. If the foreign-key does not support null values, a new relationship must be defined, the foreign-key property must be assigned another non-null value, or the unrelated object must be deleted.

                                Which relationship was the problem. Without this information it takes a long time to debug. Do you really expect production systems to be maintainable…

                                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  ·  Flag idea as inappropriate…  ·  Admin →
                                • Be able to configure initial value for identity column

                                  Currently when configuring Identity columns we can't declare the initial value. It would be nice to add an option in order to specify the initial value. This is not respected when we reverse engineer an existing database as well

                                  19 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 →
                                  • Left Join

                                    Please iclude LeftJoin, now when I must to do LeftJoin, i must use GroupJoin instead. Writing GroupJoin code is very hard to see. So I prefer LeftJoin, like context.Join(...) so now is context.LeftJoin(...)

                                    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 →
                                    • Required / MinLength should not allow empty strings

                                      To my knowledge, the RequiredAttribute data annotation for string types only results in the corresponding database table column being created as NOT NULL.

                                      I believe this is not sufficient. Moreover, it is in conflict with user interface layers, like MVC, which cannot reliably discern between an input being null or an empty string.

                                      So I'd like to suggest to amend the behaviour of the RequiredAttribute so that it will additionally create the following T-SQL CHECK constraint: CHECK (LEN(LTRIM(RTRIM( {columnName} ))) > 0).

                                      See here for full discussion:

                                      https://entityframework.codeplex.com/discussions/572641

                                      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 →
                                      • Ability to place manual code in a seperate file for SSDL and CSDL away from auto-generated code such as custom functions

                                        It would be nice to be able to place custom / manual code such as functions inside a separate file instead of placing the code in the auto-generated EDMX file.
                                        This way all of our "developer" code is away from the "auto-generated" code and can easily be found / read.

                                        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  ·  Flag idea as inappropriate…  ·  Admin →
                                        • Check linked tables

                                          https://social.msdn.microsoft.com/Forums/en-US/0ad264b8-d541-4abe-acbd-6e1178297b2a/linked-tables-and-sqltableexistencechecker?forum=adodotnetentityframework

                                          replace SQL-statement in SqlTableExistenceChecker

                                          command.CommandText = @"
                                          SELECT COUNT(*)
                                          FROM sys.objects t INNER JOIN
                                          sys.schemas s ON s.schema_id = t.schema_id
                                          WHERE s.name + '.' + t.name IN ("+ modelTablesListBuilder + @")
                                          OR t.name = '" + edmMetadataContextTableName + "'";

                                          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 →
                                          ← Previous 1 3 4 5 17 18
                                          • Don't see your idea?

                                          Entity Framework Feature Suggestions

                                          Feedback and Knowledge Base