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. 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.
-
Add support for dynamically extended queries as per LinqKit
LinqKit has shown that is possible to make the creation of queries much more dynamic, with them being composed at run time dependent on external conditions. nHibernate is good at this and LinqKit helps, but it would be nice to have an official solution.
112 votes -
Support for streams instead of byte arrays for varbinary fields
Support for mapping System.IO.Stream to Binary fields
107 votesReverting status from “under review” to “no status” since we aren’t currently working on this. We will still consider it for future releases.
-
Easy way to log SQL statements
Currently this requires lots of ceremony setting up ILogger infrastructure as described in https://docs.microsoft.com/en-us/ef/core/miscellaneous/logging.
101 votesReopening since this was originally completed for EF6 and is possible but not easy in Entity Framework Core.
-
Class diagram for Code-First POCO classes
Need a new type of ClassDiagram tool for Code-First POCO classes which should be similar to Entity Designer, capable of showing relationships, keys, db schema related meta data etc.
93 votes -
Code First support for user defined functions (UDFs)
Similar to adding support for stored procedures in Code First, but for functions also.
Using model first, this is supported and using EdmFunctionAttribute they can be used from LINQ to Entities. I really miss this in the Code First approach.
78 votesThis was partially impemented in EF Core 2.0 (mapping scalar database functions to static methods) and additional improvements have been made in 2.1 (e.g.instance methods).
-
Extra Lazy Loading
When I do user.Cars.Add() EF load all Cars for that user.
user.Cars.Count() too78 votesReverting status from “under review” to “no status” since we aren’t currently working on this. We will still consider it for future releases.
-
73 votes
In EF Core we are changing migrations to maintain one snapshot of the mode represented as code. This design change helps simplify many workflows that are common in team development.
-
Mechanism for statically defining eager loading for navigation properties
Some times, depending on how you design your model, you want a certain navigation property to be loaded *always*. It's static part of the model just like the (implicit) lazy load nature of a virtual navigation property when lazy loading is configured.
There should be a way to define eager load for navigation properties, something like:
[Include]
public ICollection<Item> Items { get; set; }and/or via DbModelBuilder:
modelBuilder.Entity<Order>().Property(x => x.Items).Include();
This would greatly simplify client code as it wouldn't have to include on each query/access, and it would also work with Find(key). This would make it more suitable to DDD-style…
69 votesReverting status from “under review” to “no status” since we aren’t currently working on this. We will still consider it for future releases.
-
Richer collection support, including ordered collections and dictionaries of value types
It would be very nice to be able to support properties which are collections of value types. Just to have an array of doubles I shouldn't need to map each value to a class. NHibernate has this feature. E.g.
class Benchmark
{
public long Id {get; set;}
public string Name {get; set;}
public IDictionary<DateTime, double> Returns {get; set;}
public int[] Vector {get; set;} // preserve the order too
}65 votesReverting status from “under review” to “no status” since we aren’t currently working on this. We will still consider it for future releases.
-
Flexible stored procedure support: return values and output parameters
Support Stored Procedure Return Values, output parameters of any type and procedures that don't return a result set, like an update statement.
60 votes -
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 -
Detach entire object graphs
I would like the option to detach an entire loaded object graph easily using the DbContext API. And to attach the graph again with several option for choosing if existing data should be overwritten or not.
51 votes -
Hooks to intercept and modify queries on the fly at high and low level
We have seen that there are lots of discussion surrounding the generated SQL not being optimized. Entity Framework should have a provision wherein User should be able to change the Generated SQL and use it for further processing through some mechanism
49 votesResetting status to reflect current state of EF Core. Some of this functionality is available to EF6-based applications: only access to store DbExpression trees and DbCommand are available, and there are no plans for adding a LINQ level interception point.
-
DiscardChanges method
We need an easy way to give the user the "Cancel" functionallity when he make changes to entities data but he does not want to save changes pressing Cancel button. I think adding DiscardChanges to ObjectContext is the solution, going back to its initial state and dissapearing added entities (even child entities) and returning modified or deleted entities to their original state
42 votes -
Allow dynamically adding properties to entities and complex types
want to use the entity framework. However I also have the requirement of allowing my users to define custom fields in our system. I would like to still use the entity framework and not use a a partial class with a hash table property.
39 votes -
API for checking database schema correctness
I would like some API for checking if database schema is correct for edmx storage model.
It could be something likeList<string> errors = new List<string>();
bool isCorrect = context.ValidateDbSchema(errors);38 votes -
Generate repositories and units of work
I'd like to see a well designed EF project template that made use of the Repository pattern for abstracting the data access technology. This should showcase best practices for using Code-First and POCO entities, UnitOfWork abstractions, solutions for querying entities that span multiple repositories, etc. This information is pretty hard to come by for EF but available in abundance for other ORMs.
36 votes -
Reverse engineering should generate XML documentation from SQL description fields
When generating from database, the EDMX designer should generate XML Documentation (Summary field) from the SQL Description field of each table/column etc.
34 votes -
Stored procedure support for eager loading graphs
So far a stored procedure can return only a plain entity. It would be great if we could create a stored procedure that returns orders and details information in a single roundtrip.
34 votes -
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
- Don't see your idea?