Skip to content

AddOrUpdate generate query with inlined parameter #57

Closed

Description

@zaytsevvla

AddOrUpdate make query to check if entity already exists in db
query look like:

SELECT TOP (2) 
    [Extent1].[Id] AS [Id], 
    ... other fields ...
    FROM [Table] AS [Extent1]
    WHERE N'id-value' = [Extent1].[Id]

I expecte query to look like:

SELECT TOP (2) 
    [Extent1].[Id] AS [Id], 
    ... other fields ...
    FROM [Table] AS [Extent1]
    WHERE @p__linq__0 = [Extent1].[Id]

Activity

  1. self-assigned this
    on Aug 31, 2016
  2. added this to the 6.2.0 milestone on Aug 31, 2016
  3. divega commented on Jan 19, 2017

    @divega
    Contributor

    Looks like we are generating constants in https://github.com/aspnet/EntityFramework6/blob/master/src/EntityFramework/Migrations/DbSetMigrationsExtensions.cs#L136.

    @anpete do you remember if this was done on purpose or should we consider changing it to be parameters?

  4. removed their assignment
    on Jan 19, 2017
  5. removed this from the 6.2.0 milestone on Jan 19, 2017
  6. rowanmiller commented on Jan 20, 2017

    @rowanmiller
    Contributor

    EF Team Triage: This issue is not something that our team is planning to address in the EF6.x code base. This does not mean that we would not consider a community contribution to address this issue.

    Moving forwards, our team will be fixing bugs, implementing small improvements, and accepting community contributions to the EF6.x code base. Larger feature work and innovation will happen in the EF Core code base (https://github.com/aspnet/EntityFramework).

    Closing an issue in the EF6.x project does not exclude us addressing it in EF Core. In fact, a number of popular feature requests for EF have already been implemented in EF Core (alternate keys, batching in SaveChanges, etc.).

    BTW this is a canned response and may have info or details that do not directly apply to this particular issue. While we'd like to spend the time to uniquely address every incoming issue, we get a lot traffic on the EF projects and that is not practical. To ensure we maximize the time we have to work on fixing bugs, implementing new features, etc. we use canned responses for common triage decisions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions