Skip to content

EntityConnectionExtensions.ExistsByIdAsync<TRow> method

namespace: Serenity.Data   assemblySerenity.Net.Services

Asynchronously checks if the record with specified ID exists.

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

Return Value

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

See Also