Skip to content

ExecuteUpdateExtensions.ExecuteUpdateGetCountAsync.XC1YSL32OLE3CRODZ3B8A41E8

Mike King edited this page Sep 30, 2025 · 2 revisions

ExecuteUpdateExtensions.ExecuteUpdateGetCountAsync<TSource>(this IQueryable<TSource>, Action<UpdateSettersBuilder<TSource>>, CancellationToken) Method

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

public static System.Threading.Tasks.Task<int> ExecuteUpdateGetCountAsync<TSource>(this System.Linq.IQueryable<TSource> source, System.Action<Microsoft.EntityFrameworkCore.Query.UpdateSettersBuilder<TSource>> setPropertyCalls, 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.

setPropertyCalls System.Action<Microsoft.EntityFrameworkCore.Query.UpdateSettersBuilder<TSource>>

A method containing set property statements specifying properties to update.

cancellationToken System.Threading.CancellationToken

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

Returns

System.Threading.Tasks.Task<System.Int32>
The number of rows updated in the database.

Clone this wiki locally