[Closed] Entity Framework Core Feature Suggestions

This web site is planned to be retired on July 31, 2019, and it 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 at GitHub.com. We are not planning to migrate the list of ideas posted here, 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, consider asking in Stack Overflow using the 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. Support lazy loading proxies on internal POCO classes

    I'd really like to not have all my model classes declared as public. Please support classes declared as internal. Even if there is a requirement to add InternalsVisibleTo("EntityFramework") or similar to the AssemblyInfo that is fine.

    6 votes
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
  2. Table splitting without primary key

    Should I have entities that use table splitting for storage, but do use a foreign key that is not the primary key, I want to be able to bring and store the data of them with the same structure I use for table splitting in fluent API as I do now with primary keys.

    2 votes
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
  3. Persistent caching of auto-compiled queries

    I know that EF code first automatically compiles queries and caches the results. But "Cold" queries are so slow.. Is possible to persist auto-compiled queries somewhere in the database so EF won't need to re-compile them again if that cache is lost (app restarted).

    2 votes
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
  4. Allow indexers in LINQ queries

    Let us access indexers in the LINQ queries... Why do I need to save named POSTed data to an intermediate variable before I use it once to query the database? It worked fine in LINQ 2 SQL, and I have been waiting for it to be fixed since EF4.

    1 vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
  5. Optional Convention that assigns Default Value to not nullable types

    When using code first with an existing database, the "can not assign null to a non nullable type" exception can be realy painfull, because the compiler gives no warning, when i project a int? to a int.

    It would be very usefull to have a Convention / Configuration that enables the automatic use of GetValueOrDefault for these cases.

    2 votes
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
  6. Entity Framework maping data definition language of Description schema

    @code first
    The Name property can mapping DDL of Description schema
    public class Person
    {
    public int Id { get; set; }

    [Description("姓名")]
    public string Name { get; set; }
    }

    @database first
    Description schema can convert property's DescriptionAttribute

    @SQL
    CREATE TABLE [ConsoleApplication3.MyDbContext].dbo.People (
    Id int IDENTITY,
    Name nvarchar(max) NULL,
    CONSTRAINT [PK_dbo.People] PRIMARY KEY (Id)
    ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
    GO

    EXEC sp_addextendedproperty N'MS_Description',
    N'姓名',
    'SCHEMA',
    N'dbo',
    'TABLE',
    N'People',
    'COLUMN',
    N'Name'
    GO

    1 vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
  7. Make PrimitivePropertyConfiguration.HasDefaultSqlValue("") or DataAnnotation attribute [DefaultSqlValue("")]

    This will make easier to set values like GETUTCDATE() for DateTime columns or other internal SQL functions.

    1 vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
  8. Update database without seeding

    It would be great to be able to do an "update-database" without having to execute the seeding commands as well. We are seeding quite a lot of meta data into our system, and it is a waste of time to wait for seeding each time we update/manipulate our model.

    A flag in command prompt like

    update-database -noseeding

    would suffice.

    11 votes
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)

    We’ll send you updates on this idea

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

    We’ll send you updates on this idea

    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
  10. Multi-Threading Support

    Make contexts thread-safe & provide support for concurrent data access without having to await each task to complete

    1 vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
  11. Support for working with databases with a lot of models

    EF needs better support for working with large models. Our developers are having very hard times with merging models between projects that are concurrently executing. Our database has over 500 tables.

    1 vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
  12. dynamicobject property column mapping

    Allow entity framework to map dynamicobject's dynamic property at OnModelCreating event.

    1 vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
  13. Provide EF Code-First migrations support for one DbContext but multiple shard databases

    I have a DbContext that is initialized with a connection string in its constructor. Each connection string points to a database that has the same exact schema as any other and is treated as a unique shard of a SQL farm.

    I want to be able to add migrations once and update all databases with ease. This is particularly useful for web applications that need to scale out their DB layer.

    1 vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
  14. Make DbDataReader available to ObjectMaterialized event handlers

    In many cases, we use joins or custom queries to return additional related data for an entity. Its a bit of paint today to manipulate this custom data and load it into the entity selectively.

    I have found a workaround using the Translate method on ObjectContext. Basically in such cases, we will execute the query manually and have the entities materialized using ObjectContext.Translate. Before invoking this method, we save the Reader in an instance variable for DbContext that is later available in ObjectMaterialized event.

    This is working great, just that we need to ensure to use Translate when we need…

    1 vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
  15. Updating the F# SqlEntityConnection Type Provider

    The F# SqlEntityConnection Type Provider is a third way to interact with Entity framework (with the other two being an .edmx file and Code First).
    http://msdn.microsoft.com/en-us/library/hh362322.aspx

    This Type Provider doesn't support the updated low-level API changes that EF 6 requires, as far as I can tell. I'd love to have an updated version that supports the async features of EF 6.

    8 votes
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  Flag idea as inappropriate…  ·  Admin →
  16. Support ObjectContext.Translate on joined result sets

    We sometimes end up doing 20 or more result sets in a single stored proc. Many times, a large majority of these are to bring back a single entry for each navigation property mapping.

    I would like to see a "wide" translate function.
    If a query has:
    SELECT a.*, b.*, c.*, d.*

    I'd like to see a version of Translate that can map each row to 4 separate object types, using the assumption that all of object A's columns are first, followed by B's, etc.

    This would greatly reduce the size of our stored procs, though there could be a…

    1 vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
  17. Future Queries

    I didn´t find any topic about this, but is very important.

    Its described here: https://github.com/loresoft/EntityFramework.Extended#future-queries

    // build up queries
    var q1 = db.Users
    .Where(t => t.EmailAddress == "one@test.com")
    .Future();

    var q2 = db.Tasks
    .Where(t => t.Summary == "Test")
    .Future();

    // this triggers the loading of all the future queries
    var users = q1.ToList();

    7 votes
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
  18. Generate DbSet.FindByKey method taking typesafe primary key

    The Find method on DbSet just take a "params object[] keyValues" parameter - not very typesafe.

    I would suggest amending the standard templates to generate

    public static class ExtendDbSet
    {
    public static MyEntity FindByKey(this DbSet<MyEntity> dbSet, Guid id)
    {
    return dbSet.Find(id);
    }
    }

    where the id parameters are generated.

    2 votes
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  Flag idea as inappropriate…  ·  Admin →
  19. Support optional complex type

    For example: Class Foo has a property named Bar and that property is a reference to the complex type ComplexBar. It would be great if Bar could be left null in cases when a "user/whatever" does not have any ComplexBar information. The benefit is that ComplexBar can have required properties and other validation that only applies when the property Bar is not null. If it is null then that validation is not triggered because it does not apply. If I want Bar to always have a value then I can flag it as required, and it will behave like complex…

    4 votes
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  Flag idea as inappropriate…  ·  Admin →
  20. 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…)
    Sign in with: facebook google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Flag idea as inappropriate…  ·  Admin →

[Closed] Entity Framework Core Feature Suggestions

Feedback and Knowledge Base