The code to generate the filter is already there. The tricky part is that delete is a bit more complicated with joins than select is. If there are any local entities (do you have those in L2S?) that match the predicate I guess they should be deleted too.
In EFUtilities I decided to have this kind of operations outside the DbContext because they are "power functions" + work differently from the normal workflow. Not sure what would be best.
Something similar to:
The code to generate the filter is already there. The tricky part is that delete is a bit more complicated with joins than select is. If there are any local entities (do you have those in L2S?) that match the predicate I guess they should be deleted too.
In EFUtilities I decided to have this kind of operations outside the DbContext because they are "power functions" + work differently from the normal workflow. Not sure what would be best.