Uploaded image for project: 'Entity Framework'
  1. Entity Framework
  2. EF-107

Bulk operation ExecuteUpdate/Delete/Insert support

    • Type: Icon: New Feature New Feature
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Dotnet Drivers

      Referring to the EF Core 7 features documented here:

      https://learn.microsoft.com/en-us/ef/core/saving/execute-insert-update-delete

      It's not clear if we should be able to use ExecuteUpdate() or ExecuteDelete(). The following code fails:

      
      public async Task<Example> ExecuteUpdate(ExampleDto data)
      {
        _dbContext.Example.Where(x => x.Id.Equals(data.Id))
          .ExecuteUpdate(entity => 
            entity.SetProperty(update => update.SampleProperty, "new sample value")
          );
      }
      
      

      Error:

      System.ArgumentException: 'must be reducible node'

      If this is supposed to work I think we need clearer documentation on the main Quick Reference page.

      If it isn't supported then it should be listed on the Limitations page.

            Assignee:
            Unassigned Unassigned
            Reporter:
            tonyhernandez743@gmail.com Anthony Hernandez
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: