.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+
The page you are viewing does not exist in the .NET Core 3.0+ platform documentation. This link will take you to the parent topic of the current section.

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.