Skip to content

Implement TagWith for ExecuteUpdate and DeleteUpdate #28690

@julielerman

Description

@julielerman

I'm currently using:
EF COre 7.0.0-rc.1.22410.9,
.NET 7.0.100-preview.7.22377.5
Visual Studio Version 17.2.3

TagWith compiles when composed with ExecuteUpdate and DeleteUpdate methods:

context.People.Where(p => p.LastName == "Lehrman").TagWith("BulkUpdate")
    .ExecuteUpdate(s => s.SetProperty(c => c.LastName, c => "Lerman"));

... but doesn't put the comment into the SQL.
Log:

info: 8/12/2022 10:31:32.136 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
      Executed DbCommand (11ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
      UPDATE [p]
          SET [p].[LastName] = N'Lerman'
      FROM [People] AS [p]
      WHERE [p].[LastName] = N'Lehrman'

Metadata

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions