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.
-
Option to use Inner Join SQL when Eager Loading (AKA IncludeRequired method)
When trying to load related entities using the "Include" eager loading feature of EF, it always generates SQL that uses an LEFT OUTER JOIN e.g.
from m in Customer.Includes("Orders")
will always generate the SQL:
SELECT ......
FROM Customers
LEFT OUTER JOIN Orders....This is not always desirable, especially when you only want to retrieve Customers that have at least one or more related Orders. By forcing the generated SQL to always use LEFT OUTER JOIN, it's going to load all Customers regardless of whether they have related Orders or not. This can become extremely inefficient, especially when there are lots…
6 votes -
Bulk Object Graph Persistence
I would like to see the ability to persist an entire object graph in one DB call. Currently it is way to chatty with the DB which makes it really slow to persist.
6 votes -
API to access MSL.
System.Data.Mapping.StorageMappingItemCollection doesn't provide useful public API.
6 votesWe are planning to include a public object model for mapping in EF6. This will be exposed in several places, including custom Code First conventions.
-
Navigation properties in composite ids without need for the corresponding scaler property
If you have a class like
public class CustomerAddress
{
public virtual Customer Customer { get; set; }
public virtual Address Address { get; set; }
public virtual string AddressType { get; set; }
public virtual DateTime ModifiedDate { get; set; }
}you should be able to create a composite id like this
HasKey(a => new { a.Customer, a.Address });
without defining CustomerId and AddressId properties
6 votes -
key
Allow mapping of database views without requiring the Key Attribute
When mapping entitis to Views, it´s common that no Key can be set, bescause the view does not provide it and you can´t map it. The idea is:
* Make it possible to map to Views (or tables) in a read only fashion that does not require the Key Attribute
6 votes -
6 votes
-
Extensible Cache
Extensible first and second level cache.
6 votes -
View Generated SQL
It'd be great if entity framework had an integrated tool such as the Profiler from Hibernating Rhinos (http://hibernatingrhinos.com/products/efprof).
I am aware that you can view the SQL generated for simple select statements by hovering over the DbSet member during debug but it would be nice to have a tool like this built into Visual Studio or that simply outputs the generated SQL to the debug console.
This should be configurable / able to be disabled.
5 votes -
support for ordering in Include()
using the include() with a 1 to many relationship, the data are loaded in the list without any specific order, forcing often to reload directly specifying the sort order
5 votes -
Extensible Architecture
Give developers the power to customize and extend the Entity Framework!!!!
5 votes -
Caching
Please include caching in EF. I have used Jarek Kowalski’s provider but it didn't cope with Stored Procedures or
5 votes -
ability to LINQ datacontext in disconnected mode
Like datatable.Select(Filter) , we need to query what's already loaded in the datacontext using LINQ , something like a disconnected mode , this would be really gret feature , its so difficult to do right now
5 votes -
Interception Mechanism
Allow specifying an interceptor (Castle, LinFu, Sprint.NET, etc) for modifying materialized entities. This allows injecting interfaces such as INotifyPropertyChanged, IEditableObject, etc.
5 votes -
ColumnAttribute to set the name of a navigation property backing onto a real column
[Column("OwnerId")]
public virtual User Owner { get; set; }
some interest was expressed by the team on this so it may be in...5 votes -
Provide means to clear the database
Provide a method on the Database class to remove all data from the database without knowing anything about the underlying physical database schema, relationships and constraints.
This is critical in order to effectively test EF related code. While one way is to recreate the database every test, it has security and performance implications.
4 votes -
Improved API for Migrations
The API for DbMigrator is lacking. I would like to see .UpOne(), .DownOne(), .Up(n), .Down(n) methods to attempt to perform that number of migrations.
.Update("0") is an odd-looking way to completely thrash the DB. Something like .RollbackAll() would be a very simple implementation and have a much clearer name.
Having .Update() take an additional optional parameter to completely rollback first, and apply all migrations from scratch might be very nice, especially in a test or development environment.
Generating an SQL script for logging purposes and then performing the DB migration must currently (I believe) be done in two steps. A…
4 votes -
Property to inform when entity is being materialized
If you perform business logic in the entitys OnPropertyChanged event handler, eg. calculating some related properties or changing a state property when certain properties are changed, your code is also run when the entity is fetched from the database. This is not a real change of the entity, it is just being loaded. It would be nice if the EntityObject class had a property bool IsMaterializing that was true so you could break out of the OnPropertyChanged handler.
4 votes -
Provide an Entity Framework Factory similar to the ADO.Net Provider which allows easy swapping betwe
Provide an Entity Framework Factory similar to the ADO.Net Provider which allows easy swapping between different Entity Framework models such as SQL Server, Oracle, MySQL, DB2 etc. simply by providing the appropriate database provider information in a manner similar to the current ADO.Net Database Provider Factory.
4 votes -
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.4 votes -
Improve conditionals on Table-per-Hierarchy
It never works when your conditionals are based on a int column so where Type=1 etc. Only seems to work for when some column Is Null. It complains about mapping when you try and do this. Seems impossible to work around
4 votes
- Don't see your idea?