Entity Framework Core Feature Suggestions

Welcome! Use this web site to submit ideas and vote for what features you want to see in future versions of Entity Framework Core.

Our team will only fix bugs, implement small improvements and accept community contributions in the EF6 codebase. Larger feature work and innovation will happen only in the EF Core codebase. If you have ideas for improving EF6, we recommend you submit them on the EF6 GitHub site listed below.

Please also consider these other options before submitting anything to this site:

  • If you want to learn how to use our products, visit our documentation pages.
  • If you want to report bugs, make contributions, or learn about our product roadmaps, visit our EF Core or EF6 project pages on GitHub.
  • If you have technical questions or need help, try StackOverflow’s EF Core or EF6 tags, or visit our MSDN forums. Note that roadmap questions, bug reports, feature requests or ideas are not appropriate for StackOverflow. Visit StackOverflow’s help center for guidance on appropriate usage.

How can we improve Entity Framework Core?

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. Allow entities from one CSDL/Context to exist in more than one namespace

    For large models, say with 100+ entities, I'd like the ability to better model the domain by breaking up the entities into packages (modules). Other frameworks support this. Even SQL Server allows tables to be broken out into different schemas for manageability only to be mashed into one namespace when modeled by 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  ·  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 →
      • Persist/Query Calculated Properties (read-only)

        This is a very useful feature that is supported in NHibernate. Given this property in the Order Entity:

        public decimal OrderTotal
        {
        get { return Items.Sum(o => o.Total); }
        }

        EF should persist this "read-only" property which can also be used in LINQ queries.

        var results = from order in DbSet<Order>
        where order.OrderTotal > 100
        select order;

        I believe a current work around is to include an empty protected setter but that has code smell all over it.

        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 →
        • Use ICustomTypeProvider to aid in a runtime customisable multi-tenant solution

          It is easy enough to add properties to a ICustomTypeProvider class but getting EF to recognise the added field would make producing a customisable multi-tenant solution a lot easier.

          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 →
          • 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 →
            • Dynamic discriminator

              use in the discriminator column the assemblyqualifiedname to be able to store any class that extend the base entity

              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 →
              • 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 →
                • Enable working config free or with unregistered providers by passing a DbProviderFactory

                  Need the ability to use an ObjectContext (or equivelent type) with an unregistered provider. Passing in a DbProviderFactory or DbConnection would be acceptable implementations.

                  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 →
                  • Include Method for IObjectSet

                    Include Method for IObjectSet

                    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  ·  Flag idea as inappropriate…  ·  Admin →
                    • Support for the TPH Inheritance for IS Null/IS Not Null pattern

                      Be able to map subclasses based on whether a column is null or not. This works in the EDMX, but not Code First

                      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 →
                      • 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 →
                        • Make DbDataReader available to ObjectMaterialized event handlers

                          In many cases, we use joins or custom queries to return additional related data for an entity. Its a bit of paint today to manipulate this custom data and load it into the entity selectively.

                          I have found a workaround using the Translate method on ObjectContext. Basically in such cases, we will execute the query manually and have the entities materialized using ObjectContext.Translate. Before invoking this method, we save the Reader in an instance variable for DbContext that is later available in ObjectMaterialized event.

                          This is working great, just that we need to ensure to use Translate when we need…

                          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 →
                          • Make PrimitivePropertyConfiguration.HasDefaultSqlValue("") or DataAnnotation attribute [DefaultSqlValue("")]

                            This will make easier to set values like GETUTCDATE() for DateTime columns or other internal SQL functions.

                            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 →
                            • Make objectcontext work with multiple edmx definitions

                              When using a framework with seperate database tables it is difficult the keep them apart. We have to merge them for each project to make joins possible but then we have to backport each change to the original framework database. It would cleaner if you can use one objectcontext for the 2 edmx files or make sub-edmx files or include them.

                              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 →
                              • Less is more

                                Keep it simple. I want to persist my objects with least possible hassle. I don’t need two or three ways of doing things. I just need one sure fire method. Meta tags seem the most straight forward: Together with the code, single point for the definition
                                On Class: Persist ([TableName ][TPH/TPT])/Ignore
                                On Property : Persist([Column Name])/Ignore ; Validation(predefined or validation method (only called when dirty)
                                Extra on collection classes: [Composite](cascades deletes) [FK property in collection type table] Validation( method , [collection changed/members changed/ both])
                                On the DB Context Validate - or CheckModel Function : Returns Dictionary(Object, List(property, message form validation,…

                                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…)
                                  2 comments  ·  Flag idea as inappropriate…  ·  Admin →
                                • createstoredprocedure Xml ParameterBuilder

                                  CREATE PROCEDURE [dbo].[sp_DownloadItemXml]
                                  @ItemId [int],
                                  @ReturnXML XML = NULL OUT
                                  AS
                                  BEGIN ....

                                  Add System.Data.SqlDbType 'Xml' equivalent to System.Data.Entity.Core.Metadata.Edm.PrimitiveTypeKind to allow an XML parameter to be generated when calling CreateStoredProcedure.

                                  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 →
                                  • Use names defined in linq query in generated sql

                                    Currently if you have something like

                                    select new { Year = c.DateEntered.Year }

                                    the generated sql uses C1 for the column name. I would find it very useful if the used Year.

                                    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  ·  tools  ·  Flag idea as inappropriate…  ·  Admin →
                                    • Support C# 6 Expression-bodied function members in Linq-to-entities

                                      C# 6 added the feature to define class attributes in Lambda like syntax as "Expression-bodied functions" - it would be great if EF could take advantage of these when parsing the expression tree for a Linq-to-entities query.

                                      That way these attributes could be used in Linq-to-entities where statements and evaluated at the database level assuming they only used canonical functions.

                                      So:

                                      public class Post
                                      {
                                      public int PostId { get; set; }
                                      public string Title { get; set; }
                                      public string Content { get; set; }
                                      public string DisplayName => Title + " " + Content;

                                      }

                                      var query =…

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

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

                                          Entity Framework Core Feature Suggestions

                                          Feedback and Knowledge Base