[Closed] Entity Framework Core Feature Suggestions

This web site is planned to be retired on July 31, 2019, and it is no longer being monitored by the EF team at Microsoft.

We have decided to unify our feedback process to focus on our existing issue trackers at GitHub.com. We are not planning to migrate the list of ideas posted here, because some of these ideas and votes were submitted a long time ago and therefore the number of votes likely does not accurately reflect the current priority for customers.

You are welcome to re-submit your favorite ideas to our issue trackers. We only request that you first search for existing issues and try to avoid creating duplicates.

Please visit the EF Core issue tracker or the EF6 issue tracker depending on what product you want to report bugs, make contributions, or submit ideas for.

Note that our team will only fix bugs, implement small improvements and accept community contributions on the EF6 codebase. Larger feature work and innovation will happen only on EF Core.

If you want to learn how to use our products, visit our documentation pages.

If you have technical questions or need help, consider asking in Stack Overflow using the EF Core or EF6 tags.

Note that roadmap questions, bug reports, feature requests or ideas are not appropriate for Stack Overflow. Visit Stack Overflow’s help center for guidance on appropriate usage.

Search for existing suggestions

(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. System.Data.Entity.DbSet<TEntity>.Create() method overload for taking n parameters

    The idea would be to overload Create() method on DbSet so as to take any parameters, resolving to the constructor tha best fits, like so

    public TEntity Create(params object[] args);

    (I understand the generated proxy for change tracking and nivigational properties support should honor all constructors defined on the TEntity type)

    This would allow for a much cleaner (and layarable) DomainModel. Entities may now be created from required values and the need to set those values (i.e. the need for public setters) after the creation dissapears.

    4 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
  2. Add Support for custom Extension methods

    Support extension methods to be defined for entities or generic extensions. As long as the extension returns an IQueryable or expression that only includes supported operations/extensions, then the provider should expand the extension method and replace it in the expression tree with the the returned iqueryable/expression.

    Thus for the most part, any extension method encountered in the expression that is not supported, should be called to return an expression that can be inserted into the expression tree. So long as the process operators recursively as it is expanding the expression, eventually the expression tree will consist of supported expressions and…

    6 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    2 comments  ·  Flag idea as inappropriate…  ·  Admin →
  3. More information from referential integrity constraint violation exception

    I get so frustrated by the referential integrity constraint violation and the fact that the exception thrown contains no information about which fields are causing the problem.

    Here's the full message for reference:
    "A referential integrity constraint violation occurred: The property values that define the referential constraints are not consistent between principal and dependent objects in the relationship."

    Could you please update this exception to provide some key information so that we can track this issue down?

    Thanks,
    -Aaron

    8 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
  4. Discriminator column support in TPT inheritance

    Currently, a discriminator column is only possible in TPH scenarios. The rational behind this is that in TPT the entity type can be inferred by joining. This is true but costly. In a serious application with many rows, the existence of a discriminator can have many benefits. For instance: one can create a composite index on the discriminator and primary key, on the base table (I could also use an index on primary key, filtered by the discriminator).

    56 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    4 comments  ·  Flag idea as inappropriate…  ·  Admin →
  5. 4 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  Flag idea as inappropriate…  ·  Admin →
  6. Use several Code First Data Contexts and several (different) Migrations in one database

    Say there is one database shared by several applications, objects are separated by schema. So it would be nice to be able to store and apply migrations for one schema independently from another one.

    29 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    9 comments  ·  Flag idea as inappropriate…  ·  Admin →
  7. Change Entity Framework behavior when constructing it(EF automatically fetches tables' structure from master.INFORMATION.SCHEMA.TABLES)

    EF automatically fetches tables by accessing the master.INFORMATION_SCHEMA.TABLES. It will cause problem when I have no permission to get access to the master database on a web server.
    A good solution could be the way how LINQ2SQL get tables(users have to drag tables they want into the O/R designer).

    Please let me know when are you going to update this behavior, coz I'm going to start a new project very soon and really want to use EF.

    Cheers,

    1 vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
  8. A code-generated clone() method for EntityObject

    It is often useful to be able to deep-copy an entity. Currently, some lifting is required to get this done; most suggestions on how to copy entities require serialization and/or reflection and therefore are performance hogs.

    The EF has what it takes to offer a really efficient clone() method: the framework could provide generated code that simply copies the required properties. As for referenced data, I suggest that that can be copied optionally and that it can stay in memory even if the clone is detached.

    1 vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
  9. 5 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  Flag idea as inappropriate…  ·  Admin →
  10. Enhance Enums by creating a Lookup Table with the Enum items

    Now that EF 5 supports enums, please (optionally) create Lookup Tables in the database with the enum items or store them in the metadata.

    This enables Lightswitch and other apps to reconstruct the enums/use the Lookup Tables.

    33 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    7 comments  ·  Flag idea as inappropriate…  ·  Admin →
  11. 5 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
  12. Compiled Code First

    The current EDMX designer doesn't work well for enterprise scenarios - it becomes incredibly cumbersome as the number of entities grows. For example:
    * It forces the developer to arrange entities visually - once you get over about 10 entities or complex relationships between them, it becomes difficult to do.
    * It's difficult to find entities - rather than scan for them alphabetically, I need to scroll around a complex diagram I don't really want.
    * The wizards get in the way - updating my model continually prompts me to modify my connection strings, I need to manually select the…

    9 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  Flag idea as inappropriate…  ·  Admin →
  13. Support of multilingual entities

    Some applications require the ability to maintain data in different languages. In relational databases, a common implementation pattern to achieve this is to use a main table for the corresponding business entity with all persistent properties mapped to table fields, and a language (or localization) table for the language dependent properties of the same business entity. A single instance of a language dependent business entity is therefore represented as a single record in the main table, and multiple records in the language table, depending on the number of supported languages.

    It would be great when EF could support this pattern …

    11 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
  14. Allow adding fluent code to each entity, to minimize the mess in the context

    There should be a way (perhaps by implementing an interface), to add fluent code separately to each entity instead of adding it all in the OnModelCreating method.
    The OnModelCreating base method should call all the entities that implement that interface and call OnModelCreating(context) of it.
    In this way the bunch of fluent code in the main context, especially if it's a large one, would tidy up in the individual entities.
    Of course, this is already simply doable, but I think this should go out the box.

    5 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  Flag idea as inappropriate…  ·  Admin →
  15. Support concurrency checks in derived types when using TPT inheritance

    Remove the limitation to perform concurrency checks on derived types. Now you may only use properties from the base type for concurrency checks.

    7 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
  16. Object graph deep clone and object shallow Clone

    It would make sense to allow shallow and deep cloning as a default requirement. There are currently some work-arounds, like serializing and then deserializing or even detach and re-attach, but each has their downfalls and it makes sense to me to include such functionality in by default to ensure highest performance and stability

    6 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
  17. Make LINQ to Entities recognize GetValueOrDefault()

    I have a LINQ query that involves a nullable integer. When I try to run the query, I get the following error:

    "LINQ to Entities does not recognize the method 'Int32 GetValueOrDefault(Int32)' method, and this method cannot be translated into a store expression."

    I am not a L2E or EF guru in the least, but it seems like that should translate to the SQL ISNULL function shouldn't it?

    Regardless, can you please make this functionality work?

    21 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    2 comments  ·  Flag idea as inappropriate…  ·  Admin →
  18. 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
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
  19. Provide Designer Mapping support from a Conceptual Model to multiple Storage Models

    Currently, when using Entity Framework tools from other vendors, a developer has to manually create and modify the mapping from a Conceptual Model to another Storage Model (such as from Oracle) in order to support persistence to multiple database platforms. Instead, it would be great if Visual Studio offered designer support to easily and readily map a .csdl to one or more storage models. This would eliminate much of the current tedium required to support multiple database platforms using Entity Framework.

    1 vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
  20. Query from entity

    The Query method on the DbCollectionEntry and DbReferenceEntry classes provides access to the underlying query that the Entity Framework uses when loading related entities. A similar Query method should be added to DbEntityEntry.

    1 vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Flag idea as inappropriate…  ·  Admin →

[Closed] Entity Framework Core Feature Suggestions

Feedback and Knowledge Base