[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. Allow different key names for parent entity

    It would be useful to be able to create relationships between entities where the parent entity does not use the primary key as it's end of the relationship. For example:

    public class Signer
    {
    [Key, Column(Order = 0)]
    public Guid EntityUUID { get; set; }

    [Key, Column(Order = 1)]
    public Guid SignerUUID { get; set; }

    [ForeignKey("EntityUUID")]
    public virtual User User { get; set; }
    }

    public class User
    {
    [Key]
    public int Id { get; set; }

    //Allow this column to be set as the key for signers instead of always using Id
    public Guid? EntityUUID { get; set;…

    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 →
  2. sp_fkeys

    Using code first, when you try to apply "update-database" and you receive the message: "Could not drop object 'dbo.Table1' because it is referenced by a FOREIGN KEY constraint."

    The message should show the result of the command "sp_fkeys", then easily the developer can identify the keys to remove.

    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 →
  3. Azure Storage

    I know it was said that Azure Table Storage support will come after the SQL Server support for ASP .Net 5 is done.

    I'm just saying, I still want this as soon as possible.

    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 →
  4. Designer support for specifying Interfaces for Entities

    I have an interface that a lot of my entities support.

    interface Audit
    {
    DateTime CreatedAt,
    int CreatedBy,
    DateTime ModifiedAt
    int ModifiedBy
    }

    It would be nice to be able to mark Entities as supporting this interface in the designer.

    See also http://stackoverflow.com/questions/4093897/interface-inheritance-in-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 →
  5. Support JSON LINQ queries

    As MS is adding json support to Sql Server 2016 it would be great if EF could support this with linq queries and convert a tree with arrays to nested lists.

    8 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 →
  6. Support another Entity as a Key

    Since all entities require a key, declaring an entity 'A' as a key in another entity 'B', EF could lookup the key for that entity (A), and use it as the key for this entity (B) too. This keeps the model classes in .NET "clean" in the sense they don't need to duplicate they key field. E.g.

    class A {
    string Key { get; set; }
    }

    class B {
    A Key { get; set; }
    //Not required, since A has a key defined on it already, and our key is of type A
    //string KeyWhenPersistedToARelationalDatabase { get; set; } …

    1 vote
    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 →
  7. Enable extending entity framework model wizard 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.

    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 →
  8. Change schema for DbContext per 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

    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 →
  9. 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…

    2 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. 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

    2 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 →
  11. 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

    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 →
  12. 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
    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 →
  13. 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…

    28 votes
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    3 comments  ·  Flag idea as inappropriate…  ·  Admin →
  14. 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.

    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 →
  15. 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;…

    3 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 →
  16. 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

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

    2 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 →
  18. Allow foreign key relationships to be configured from within code first Conventions

    I'm currently in the situation where I need to create a foreign key relationship for about 40 entities in my edmx back to a common "Users" table. I'd like to be able to solve this problem using Conventions, but it appears I cannot access the HasRequired or HasOptional functions from within a convention. I believe making these functions available would be a real time saver.

    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 →
  19. 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

    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 →
  20. 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)

    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