[Closed] Entity Framework Core Feature Suggestions

This web site 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 over at GitHub.com. We are not planning to migrate the list of ideas posted here automatically, 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, try Stack Overflow’s 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. Clear, Complete, and Accurate Documentation

    Break the mold! Provide clear concise documentation that describes the API, the intended use for each API, the purpose and use (with examples of the arguments to each method), and explanatory samples and snippets that are both complete and clearly show the intened information.

    4 votes
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
  2. 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
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
  3. Visual Studio Database Project integration

    Support for updating a Visual Studio Database Project(s) instead of updating the db directly with an ad-hoc file.

    Currently 4.0 allows us to generate our database schema from the model but its capabilities are limited and destructive:
    unique keys – no support
    schema generation – destructive

    Database Projects for Visual Studio has already matured and more importantly has the capability of updating schemas without being destructive to the data. It would be nice to see the next designer integrate fully with this product rather than re-invent the wheel. For those of us that manage our databases using Database Projects this…

    4 votes
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
  4. Add polymorphic associations support

    Add support for polymorphic associations like <any> and <many-to-any> in NHibernate.

    4 votes
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
  5. Generate the Association objects based on the Foriegn Key Column Name

    Generate the Association objects in a model based on the Foriegn Key Column Name rather than "Association1", "Association2" etc

    4 votes
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    2 comments  ·  Flag idea as inappropriate…  ·  Admin →
  6. Provide Refactor Into Existing Complex Type

    In the designer we can Refactor Into New Complex Type, but once we have done this we cannot Refactor all other instances into Existing Complex Type.

    4 votes
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
  7. Visual Studio diagram designer

    A full fledged diagram designer that allows editing the EF Core model using boxes and lines metaphor rather than code. Where you can add/update/remove tables and views from an existing database.

    3 votes
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
  8. Support tuples in query expressions

    With the introduction of first-class support for tuples in C#7, Entity Framework should add support for tuples inside query expressions along.
    SO issue here: http://stackoverflow.com/questions/17595105/use-tuples-with-entity-framework-contains-statement

    The lack of support for this is super frustrating, especially since anonymous classes are not supported in EF either, and from a performance perspective this is simply a fixed number of values being passed into a query (ie: should not be any more complex to execute on the DB).

    For example, the following should work but is currently not supported:

    IEnumerable<string> identifers = /*get from somewhere*/....;

    Tuple<string, string>[] identifierPairs = originIdentifers.Select( _ => {
    string[]…

    3 votes
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
  9. 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…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
  10. 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…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    2 comments  ·  Flag idea as inappropriate…  ·  Admin →
  11. Update with Where Clause

    We should be able to update with a where clause.

    For example, you have an entity named "Product" that is bound to a "User". You want to be sure that the update is done on the product that you have your new values but also to the current user when the product is saved. Normally, in SQL we do a Update statement on Product table by setting new values to the product (where clause). What is missing is the ability to also add a AND statement to add the User Id. This way, we can be sure that the entity…

    3 votes
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
  12. Allow foreign key columns to be shared between a subset of TPH subclasses

    Scenario in the post http://entityframework.codeplex.com/workitem/583 works only for columns that are not foreign keys.

    For example we have BaseEntity and three inherited entities:
    InheritedEntity1.Name
    InheritedEntity2.SpecialStatus
    InheritedEntity3.SpecialStatus

    SpecialStatus is entity stored in separate table.

    BaseEntity table will have columns 'Name', 'SpecialStatus_Id', 'SpecialStatus_Id1'

    Try to change the name of the column:
    modelBuilder.Entity<InheritedEntity2>().HasOptional(p => p.SpecialStatus).WithOptionalDependent().Map(i => i.MapKey("SpecialStatus_Id"))
    modelBuilder.Entity<InheritedEntity3>().HasOptional(p => p.SpecialStatus).WithOptionalDependent().Map(i => i.MapKey("SpecialStatus_Id"))

    and get an ModelValidationException:
    "One or more validation errors were detected during model generation:
    SpecialStatus_Id: Name: Each property name in a type must be unique. Property name 'SpecialStatus_Id' is already defined.
    "

    3 votes
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
  13. namespace complex types

    Place complex types generated by the database in their own namespaces. Right now, when a stored procedure is imported, a complex type is generated and placed in no particular namespace, so all of the complex types are floating about.

    Perhaps instead, use the namespace that's been given to the model.

    3 votes
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  Flag idea as inappropriate…  ·  Admin →
  14. Better support for modeling and regenerating existing database views

    The current database first support for views is not very good. I would like to see: readonly views where no key is assumed, updatable views where key can be selected, and at least an remembering of the actual create view syntax so that "generate database from view" will create a view and not a table. I often import a database view into my model and often do "generate database from model" to create a new empty database I can compare to production to make sure they are in sync. To do the latter, I have to delete all the sql…

    3 votes
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
  15. Allow inserting new entities with predefined identity column values (INSERT_IDENTITY)

    Especially for migration projects it would be useful to allow entities to be saved with predefined identity values.

    Until now you have to use ADO.NET to do this.
    SET IDENTITY_INSERT TableName ON
    INSERT INTO TableName (IdColumn, Column1)
    VALUES (234, 'Value')

    I would like to tell the DbContext to use this feature when saving new entities.

    3 votes
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

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

    3 votes
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  Flag idea as inappropriate…  ·  Admin →
  17. Update model from database should update complex types returned by stored procedures

    When using option 'Update model from databes' VS should update complex types returned by SP - now every SP have to be updated manually

    3 votes
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  Flag idea as inappropriate…  ·  Admin →
  18. Support Pessimistic Concurrency

    Allow a Select with UpdLock which locks all returned entities in the Database. This is a basic requirement to program for example a ticket sales portal with entity framework! So far it's not possible and I still have to stick to NHibernate :(

    3 votes
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
  19. Make objectcontext work with multiple edmx definitions

    When using a framework with seperate database tables it is difficult the keep them apart. We have to merge them for each project to make joins possible but then we have to backport each change to the original framework database. It would cleaner if you can use one objectcontext for the 2 edmx files or make sub-edmx files or include them.

    3 votes
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
  20. Auto Create CRUD stored procedure

    EF should have the ability to automatically create basic CRUD stored procedures for every table. These basic CRUD stored procedures will only focus on a single table and all it's columns.

    An advanced feature would be the ability to auto generate CRUD stored procedures that take into account parent and child tables or many to many scenarios, etc.

    Other features would be to create stored procedures that allow for paging and streaming of large amounts of data. Say you have a web page that list contacts and you want ot show the 10th page. It would be ice to autogenerate…

    3 votes
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
1 2 5 7 9 12 13

[Closed] Entity Framework Core Feature Suggestions

Feedback and Knowledge Base