Skip to content

WhereBulkContains not working with ExecuteDelete() of EF Core #621

@danielisenmann

Description

@danielisenmann

Hi,
we stumble upon the issue that WhereBulkContains doesn't work in conjunction with ExecuteDelete. It seems that WhereBulkContains doesn't return anything which can be used by ExcecuteDelete afterwards which leads to the issue that ExecuteDelete deletes the whole table.

I have written a small fiddle example of it here: https://dotnetfiddle.net/0HVPf6

We are using the latest version of EF Core Extensions (Z.EntityFramework.Extensions.EFCore 9.103.7.2) with latest version of .NET 9.

I have not seen any documentation about this issue at the moment or anything that WhereBulkContains should not be used with ExecuteDelete. Maybe I have missed it.

I know that I can use DeleteFromQueryAsync instead but I just wanted to report this issue with ExecuteDelete.

Regards
Daniel

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions