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.
-
Full Text Search
Provide Full-Text Search capabilities similar to Lucene.Net-NHibernate
94 votes -
EF Designer store model editing
The EF designer only allows you to edit the model, not the store. This means the EF designer only contains 50% of the functionality required to actually do model-first development. Without being able to add tables, views, stored procedures, and constraints there is nothing to map your entity properties to.
The only alternative way is to "Update model from database...", but it forces you to create entities for the tables you import, when all you really want is for you tables to be listed in your store and available to be mapped to. Furthermore, if a table in the DB…
89 votes -
Offer eager loading strategies
I supposed that eager loading currently supports only single fixed strategy and except some rare cases this strategy always joins all eager loaded data to one huge record set - at least that is what I saw so far.
I described the impact of such eager loading on Stack Overflow: http://stackoverflow.com/q/5521749/413501
It would be nice to have some control over the way how eager loading is executed with possibility to define if eager loaded data should be joined into single result set with the main data or if they should be executed in separate query.
Something like:
var data =…87 votes -
Poco as Interface in Code First
It's unfortunate not to be able to mark interfaces for EF mapping (code first). This will allow to really abstract the implementation. Allows a unique representation of the data in the context of RIA Services (if Ria Services allows also for interface 'mapping'). This won't be very hard to implement since EF is happy when it subclasses... For the benefits: imagine you have only interfaces to declare your model. On the server side, you use EF to get your interfaces 'filled' from DB. on the client side you get those same interfaces filled by RIA services... You can reuse any…
86 votes -
73 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);71 votes -
70 votes
-
dictionary
Support mapping IDictionary types to tables.
68 votes -
Ability to plug-in custom conventions for schema generation
EF CTP4 comes with a set of built-in conventions for model discovery and schema generation. We should be able to alter these conventions as opposed to re-mapping the entire class from scratch.
Scenarios:
1) I'd like to replace DataAnnotations with EntLib Validation Block and I should be able to tell EF to use my attributes.
2) I want to apply a common convention like prefixing all tables with some string or even a more complicated scenario like all entities that derive from Inventory should generate tables with name: Inventory.<EntityName>.67 votesEF6 alpha 1 contains a first cut of custom Code First conventions support. See the blog post for the announcement: http://blogs.msdn.com/b/adonet/archive/2012/10/30/ef6-alpha-1-available-on-nuget.aspx.
-
Provide mechanism to statically define 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…
64 votes -
Update table directly using expressions, predicates
Allow for direct updates to the database using expressions.
Here is an example, but it only works with constants.
A real solution needs to be able to evaluate expressions, which could translate into nested SQL queries.
61 votes -
EDMX Generator 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.
59 votes -
Dynamically add fields to the entity framework
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.
58 votes -
ObjectContext DiscardChanges
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
57 votes -
"Update Model from Database" should update CSDL section
As per http://social.msdn.microsoft.com/Forums/en/adodotnetentityframework/thread/e05f6c62-2dbd-4c3f-87f9-c30c184597c5, Update Model from Database updates only the data type lengths and nullability, however, it wont always refresh the CSDL section.
Due to this behavior, every time I update my database schema, I need to delete the .edmx file from my project and re-generate the ADO.NET entity model again from the database. BTW, this also requires a kludge to remove the previous ConnectionString from app.config, or else the names of the generated entities are not the same.
I would like Update to work as if I had started from scratch, and not some optimized way I don't…
55 votes -
Code First support for mapping User Defined Functions (UDF)
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.
54 votesThe plan is to add support in Code First for all the same kind of functions that are supported by the core runtime, including stored procedures, user defined functions, and table valued functions.
-
Merge method: automatic synchronization of relationships on a disconnected entity
A problem encountered when an entity is instantiated using non-ef infrastructure, e.g. ASP.NET MVC model binder mechanism. Such entity is pure poco class without proxy. Updates of relationship of the entity can be only synchronized using manual approach according to MSDN(and proven by experience)
http://msdn.microsoft.com/en-us/library/ee373856.aspx "If you are working with disconnected objects you must manually manage the synchronization."
Manual synchronization is really painful approach and really not a good ORM style solution.
The problem even becomes critical for me in decision to migrate my application to nhibernate due to the fact that nhibernate can do such synchronization without problems http://www.codinginstinct.com/2009/11/nhibernate-feature-saveorupdatecopy.html…53 votes -
EDMX Designer Annotations support
As I found in CSDL format description there is a possibility to extend model by Annotations.
I know annotations with unique identities for every metadata entity (and property) can solve renaming problem without drop and recreating entities (or properties).
For example: in custom ddl provider (wanted ability to write it) could write this identities in extended properties (Sql Server) or in comments table (Oracle). Then, during upgrade it will be easy to found things that was renamed, deleted or added. Of course if providers upgrade method will have both models in signature.52 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.
51 votes -
need a QueryExecuting event to modify query BEFORE it runs
We need to validate and possibly modify ALL queries run against our ObjectContext. We want this at a high level, not the T-SQL level.
51 votes
- Don't see your idea?