Skip to main content
A newer version of this page is available. .

XPQueryExtensions.SingleAsync Method

Name Parameters Description
SingleAsync<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. Otherwise, throws an exception.
SingleAsync<T>(IQueryable<T>, CancellationToken) static query, cancellationToken Asynchronously gets the object from a selection if this selection has only one object. Otherwise, throws an exception.