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. For char/nchar and varchar/nvarchar columns use the actual column type and size in the parameter definition

    I can see that EF uses varchar(8000) for the parameter instead of the actual type (char(6) in a particular case). Would it be possible for EF to use the actual column type and size instead of varchar(8000) or nvarchar(4000)?

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

      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 →
      • code first support for view

        allow to define a view by code first.

        actually we can map an entity to a view but it then becomes nasty to:
        - generate the database,
        - migrate the database
        - evolve the schema in general

        It should be possible to:
        - declare a DbSet that does not involve a table creation
        - declare a view, with a linq query for example, that allows view creation.

        For DbSet if should be a convention: if table name starts with vvv then it is a view, do not create a table

        For view creation... no idea actually.

        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 →
        • Table splitting without primary key

          Should I have entities that use table splitting for storage, but do use a foreign key that is not the primary key, I want to be able to bring and store the data of them with the same structure I use for table splitting in fluent API as I do now with primary keys.

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

            support sequence, not only for key, but as a common field/column/property. This should be mapped, in sql server case, to CREATE SEQUENCE.

            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 hook into ValidationContext creation and set ServiceContainer

              I'd like to set the IServiceProvider in the ValidationContext constructor, so that I can access validation logic outside the IValidatableObject.Validate() method (and within custom data annotations) in a loosely coupled manner.

              As far as I can see, ValidationProvider.GetEntityValidationContext() passes a null for the IServiceProvider and there is no way to override/"hook into" this method or InternalEntityEntry.GetValidationResult() from the public API.

              Something like what ASP.NET MVC or Web API does with DataAnnotationsModelValidatorProvider or ValidatableObjectAdapter might be nice.

              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 →
              • Allow Disabling the Default Transaction Behavior of ObjectContext.ExecuteFunction()

                EF6 introduced a breaking change to the ObjectContext.ExecuteFunction() API causing it to start a transaction when one does not already exist. This behavior should be made optional.

                26 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 →
                • Isolate the migrations from EF

                  The migrations in EF is great. I'd love to see it isolated, so it can be installed seperatly.

                  Not every project needs the full EF (in DDD layer, Migrations isn't required, but my .Data or DAL layer needs it) and this would make it easier to use tools like Dapper (that doesn't have a Migrations included)

                  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  ·  tools  ·  Flag idea as inappropriate…  ·  Admin →
                  • Support lazy loading proxies on internal POCO classes

                    I'd really like to not have all my model classes declared as public. Please support classes declared as internal. Even if there is a requirement to add InternalsVisibleTo("EntityFramework") or similar to the AssemblyInfo that is fine.

                    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 →
                    • Built-in concurrency update and delete

                      Built-in update and delete concurrencies by enable a standard rowrevision, combine with automatic scaffolding in mvc.

                      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 →
                      • Persistent caching of auto-compiled queries

                        I know that EF code first automatically compiles queries and caches the results. But "Cold" queries are so slow.. Is possible to persist auto-compiled queries somewhere in the database so EF won't need to re-compile them again if that cache is lost (app restarted).

                        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 →
                        • 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 →
                          • Update database without seeding

                            It would be great to be able to do an "update-database" without having to execute the seeding commands as well. We are seeding quite a lot of meta data into our system, and it is a waste of time to wait for seeding each time we update/manipulate our model.

                            A flag in command prompt like

                            update-database -noseeding

                            would suffice.

                            7 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 →
                            • Designer Option to Support Conversion Mapping from DateTime to DateTimeOffset

                              Request Designer Option to Support Conversion Mapping from DateTime to DateTimeOffset in light of community opinion seeminly moving toward DateTimeOffset as a standard. In fact, OASIS OData v4 pruned DateTime in favor of DateTimeOffset.

                              Unfortunately, modifying database schema is much easier said than done. Entity should have some sort of automapping/conversion to support the get/set between the persistence and poco layers.

                              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 →
                              • 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 →
                                • Allow indexers in LINQ queries

                                  Let us access indexers in the LINQ queries... Why do I need to save named POSTed data to an intermediate variable before I use it once to query the database? It worked fine in LINQ 2 SQL, and I have been waiting for it to be fixed since EF4.

                                  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 →
                                  • Updating the F# SqlEntityConnection Type Provider for EF 6

                                    The F# SqlEntityConnection Type Provider is a third way to interact with Entity framework (with the other two being an .edmx file and Code First).
                                    http://msdn.microsoft.com/en-us/library/hh362322.aspx

                                    This Type Provider doesn't support the updated low-level API changes that EF 6 requires, as far as I can tell. I'd love to have an updated version that supports the async features of EF 6.

                                    15 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 →
                                    • support tables with the same name but diffrent schema

                                      assume we have a table named Transaction with a schema GL and another one named Transaction but belongs to AR schema,
                                      until now , could not be mapped in code-first

                                      7 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 →
                                      • Better error message for "The cast to value type ... "

                                        It would be very usefull to get the name of the corresponding property or fieldname that causes the "The cast to value type 'System.Int32' failed because the materialized value is null...." exception.

                                        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 →
                                        • Entity Framework maping data definition language of Description schema

                                          @code first
                                          The Name property can mapping DDL of Description schema
                                          public class Person
                                          {
                                          public int Id { get; set; }

                                          [Description("姓名")]
                                          public string Name { get; set; }
                                          }

                                          @database first
                                          Description schema can convert property's DescriptionAttribute

                                          @SQL
                                          CREATE TABLE [ConsoleApplication3.MyDbContext].dbo.People (
                                          Id int IDENTITY,
                                          Name nvarchar(max) NULL,
                                          CONSTRAINT [PK_dbo.People] PRIMARY KEY (Id)
                                          ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
                                          GO

                                          EXEC sp_addextendedproperty N'MS_Description',
                                          N'姓名',
                                          'SCHEMA',
                                          N'dbo',
                                          'TABLE',
                                          N'People',
                                          'COLUMN',
                                          N'Name'
                                          GO

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

                                          Entity Framework Feature Suggestions

                                          Feedback and Knowledge Base