IRowOperationInterceptor.FindRowAsync method
namespace: Serenity.Data assembly: Serenity.Net.Services
Intercepts the async EntityConnectionExtensions ById/TryById/First/TryFirst/Single/TrySingle methods. The default implementation forwards to FindRow.
public Task<OptionalValue<IRow>> FindRowAsync(Type rowType, OptionalValue<object> id,
ICriteria where, Action<SqlQuery> editQuery, bool byIdOrSingle,
CancellationToken cancellationToken = default(CancellationToken))
| parameter | description |
|---|---|
| rowType | Type of the row. |
| id | The identifier if one of the ById methods is used. |
| where | The where criteria for the First/TryFirst/Single/TrySingle methods. |
| editQuery | Callback to edit the query. |
| byIdOrSingle | True if one of the ById/TryById/Single/TrySingle methods is used. |
| cancellationToken | Cancellation token |
Return Value
Entity with the given ID, or null if not found.
See Also
- struct OptionalValue<T>
- interface IRow
- interface ICriteria
- class SqlQuery
- interface IRowOperationInterceptor