SingleOrDefaultAsync<T>(IQueryable<T>, Expression<Func<T, Boolean>>, CancellationToken)
static
|
query, predicate, cancellationToken
|
Asynchronously gets the object from a selection if only one object in the selection meets the specified requirements. If the selection is empty, returns a default value for <T>.
If the selection has more than one of such elements, throws an exception.
|