Skip to content

EntityConnectionExtensions.ExistsAsync<TRow> method

namespace: Serenity.Data   assemblySerenity.Net.Services

Asynchronously checks if record matching specified criteria exists.

public static Task<bool> ExistsAsync<TRow>(this IDbConnection connection, ICriteria where, 
    CancellationToken cancellationToken = default(CancellationToken))
    where TRow : class, IRow, new()
parameter description
TRow The type of the row.
connection The connection.
where The where criteria.
cancellationToken The cancellation token.

Return Value

A task representing the asynchronous operation. The task result is true if a record matching the criteria exists.

See Also