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.
-
Make EF IoC Friendly
Make EF IoC friendly. It would be nice to have extensions to setup IoC w/ EF.
23 votesEF6 alpha 1 includes a service locator-based system for plugging in alternate implementations of specific services. See here for a spec: http://entityframework.codeplex.com/wikipage?title=EF%20Configuration%20and%20Extensibility
However, materialization is still not extensible in or other mechanism.
-
Built-in entity auditing!
EF should have some better data change tracking/auditing plumbing...on par with the extensive trace listener class support in ASP.NET. In order to create an audit history of the CRUD actions taking place within my entity model in EF 4.0, I had to write a lot of custom code and override the SavingChanges event and the OnContextCreated method to make it happen. Even now it doesn't properly catch all actions due to certain limitations (such as having DB-set identity fields). Think about how to make auditing data changes simpler and richer for devs!
22 votes -
Having a real designer...
It should be great to have a designer which supports all mapping (so which allow us to realize TPC, Horizontal Entity Splitting).
It should be great to have a designer that supports partial model views as I did (http://msmvps.com/blogs/matthieu/archive/2009/04/07/edm-designer-new-version.aspx, http://msmvps.com/blogs/matthieu/archive/2009/04/11/edm-designer-new-feature.aspx)
It should be great to be able to see complex types on the designer and not only on Model Browser window as I did (http://msmvps.com/blogs/matthieu/archive/2009/01/07/edm-designer.aspx).
It should be great to not lose all our ssdl changes when we update the model from db.22 votes -
LINQ support for comparison of varbinary columns
It is not currently possible to write a LINQ query that compares a value to data stored in a varbinary column. By comparison, I mean SQL-supported <, <=, >, >= comparisons that lexicographically compare the bytes in the column.
As far as I know there is no way to write these queries without stepping down into Entity SQL.
see http://social.msdn.microsoft.com/Forums/en-US/adodotnetentityframework/thread/f90dec50-acc7-4157-8927-acb246ec3572 for more.
22 votes -
Hooks to modify the Generated SQL on the fly
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
21 votes -
Test suite for EF provider compliance
There should be a standard EF Test Suite. As the test suite ideally could run against any of the databases, it would ease out the work required to see compliance against different Databases
21 votesUpdating the title to reflect what I believe is the original intent of JK.
-
Result of Sum() of an empty set should be 0 rather than NULL in LINQ to Entities
Currently if an empty set is expected it is necessary to cast either the result or the input elements of Sum to Nullable<T> to compensate for the type mismatch between the SQL database and the signature of the methods in LINQ.
21 votes -
Foreign Key naming should use suffix 'Id' (or configurable string)
When generating a model from a database using foreign keys, the model generator ends up calling the foreign key id field 'blah' and the navigation property 'blah1'. Instead the generator should use 'blahId' (or configurable suffix) for the foreign key numeric and 'blah' for the navigation property to make the accessing functions more obvious to developers
19 votes -
Non-English custom pluralization conventions
Support for different languages pluralization conventions.
18 votes -
Support for SQL Server Change Data Capture -- or at least tables with no primary keys
Change Data Capture is one of the coolest features in SQL Server 2008+. I know it's not core to tailor things for one database technology, but this feature is completely unsupportable in the current EF because EF doesn't allow tables without PKs (and the tables SQL Server gens for CDC have no PKs). Ideally, some sort of real support would be allowed that would allow for some sort of Entity.CDC or something that would string together the tables that an entity uses ... but that is probably a bridge too far.\
17 votes -
Ability to intercept and cancel changes to properties
(Note that the original description of this idea talked about making PropertyChangingEventArgs cancellable. Although this is an interesting request, it is not a change we could implement in EF. In fact, there is probably not way it can be implemented in .NET without defining a new standard interface for change tracking)
Rather than declining the idea, I am renaming it to capture the essence that is still potentially applicable to EF: provide a hook that can be used by an application or library to intercept what happens whenever EF detects that a property of a tracked object is being changed…
17 votes -
Allow columns to be shared between a subset of TPH subclasses
In a TPH hierarchy, it seems as though columns can only be used across all types (i.e. defined in the base class), or can only be used in one and only one subclass.
The below URL describes the scenario very well:
http://stackoverflow.com/questions/4389227/entity-framework-4-ctp5-code-first-how-to-share-common-column-names-in-a-hierarIt seems like a pretty common scenario to want to support. TPT often does not scale, and it's poor OO design to move partially-shared properties into the base class. There should be a way to share the same column across an arbitrary subset of the subclasses in the class hierarchy.
16 votesThis was a bug and was fixed in EF6: http://entityframework.codeplex.com/workitem/583.
-
Delete Collections
I think there would be nice idea if you give method to delete collection. Without using foreach statement.
Now:
foreach(var item in collection)
{
db.Customers.Remove(item);
}
db.SaveChanges();and should be simply
db.Delete(collection);
db.SaveChanges();16 votes -
Edmx from dbproj
In a large enterprise environment we use vs2010 dbproj to maintain schema objects. The workflow to re-create after changes to schema requires us to deploy a db schema run edmgen2 and re-import all exiting functions and rebuild complex types. Provide a tool that reads dbschema to build edmx and retains functions and complex types if no changes in signatures
16 votes -
Support FileStream and FileTable
please add SQL Server 2012 features to new release of entity framework and code first that support filestream and filetable
16 votes -
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 …
16 votes -
Add ability to include multiple edmx files in another edmx file
Allow to split single model to multiple edmx-files and use any subset of these files in any file of set.
Sometimes most of entities of large model are linked but there is theoretical possibility to split them to several subsets to parallelize work in team.
Single edmx file sometimes caused conflicts during merging changes produced by different developers of team. Multiple linked edmx-files could prevent conflicts.
Existing Using element exists only in CSDL model and is not supported by designer.16 votes -
More constructors for providing connection string information to MigrateDatabaseToLatestVersion
I'm obtaining my connection string through a non-default mechanism. When I Database.SetInitializer() to the MigrateDatabaseToLatestVersion<,> class, I cannot specify a DBConnection, DBConnectionInfo, or connection string even though the DBMigrationsConfiguration has a TargetDatabase property. I would prefer to be able to pass a DBConnection into the initializer class (since I'm using the same method to instantiate my DbContext); however, I should at least be able to pass in a DBConnectionInfo so that I don't have to subclass or use servicelocation just to use my own connection string.
16 votes -
Map multiple entities to same table
I should be able to map multiple models to the same table. For example consider a User table. I may have a model for logging in, changing a password, resetting a password and maintaining a user. I would normally create different domain models for each of these use cases. However, I am not able to map these models to a single table.
Here is a link with a workaround by MSFT, but would like to avoid workaround...
http://social.msdn.microsoft.com/Forums/en/adodotnetentityframework/thread/0f65caae-8a66-431f-aa02-4b2c68f871e915 votes -
Synonym Support
The ability to create an entity for a synonym in the database.
15 votes
- Don't see your idea?