Skip to content

ExecuteUpdateExtensions.ExecuteDeleteGetRowsAsync.NTUQ2MDCRFBCNFH2RN8XRNMZD

Mike King edited this page Nov 9, 2025 · 3 revisions

ExecuteUpdateExtensions.ExecuteDeleteGetRowsAsync<TSource>(this IQueryable<TSource>, CancellationToken) Method

Deletes all database rows for the entity instances which match the LINQ query from the database.

public static System.Threading.Tasks.Task<System.Collections.Generic.IList<TSource>> ExecuteDeleteGetRowsAsync<TSource>(this System.Linq.IQueryable<TSource> source, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken))
    where TSource : class;

Type parameters

TSource

The type of the elements of source.

Parameters

source System.Linq.IQueryable<TSource>

An System.Linq.IQueryable<> whose elements to test for a condition.

cancellationToken System.Threading.CancellationToken

A System.Threading.CancellationToken to observe while waiting for the task to complete.

Returns

System.Threading.Tasks.Task<System.Collections.Generic.IList<TSource>>
An System.Collections.Generic.IList<> containing the deleted rows.

Clone this wiki locally