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

XPQueryExtensions.FirstOrDefaultAsync Method

Name Parameters Description
FirstOrDefaultAsync<T>(IQueryable<T>, Expression<Func<T, Boolean>>, CancellationToken) static query, predicate, cancellationToken Asynchronously gets the first object that meets specified requirements in a selection. If the selection is empty, returns a default value for <T>.
FirstOrDefaultAsync<T>(IQueryable<T>, CancellationToken) static query, cancellationToken Asynchronously gets the first object in a selection. If the selection is empty, returns a default value for <T>.