Skip to main content
.NET Framework 4.6.2+

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.