public static async Task <T> SingleOrDefaultAsyncOk <T>( this IQueryable <T> query, CancellationToken cancellationToken = default) => query.Provider.GetType() == typeof(NHibernate.Linq.DefaultQueryProvider) ? await LinqExtensionMethods.SingleOrDefaultAsync(query, cancellationToken) : query.SingleOrDefault();
public Task <TSource> SingleOrDefaultAsync <TSource>(IQueryable <TSource> source, CancellationToken cancellationToken = default(CancellationToken)) => LinqExtensionMethods.SingleOrDefaultAsync(source, cancellationToken);
public Task <TSource> SingleOrDefaultAsync <TSource>(IQueryable <TSource> source, Expression <Func <TSource, bool> > predicate, CancellationToken cancellationToken = default(CancellationToken)) => LinqExtensionMethods.SingleOrDefaultAsync(source, predicate, cancellationToken);