public static Task <bool> ContainsAsyncLinqToDB <TSource>(
     this IQueryable <TSource> source,
     TSource item,
     CancellationToken token = default)
 => AsyncExtensions.ContainsAsync(source.ToLinqToDB(), item, token);
コード例 #2
0
 /// <summary>
 /// Determines whether a sequence contains a specified element by using the default
 /// equality comparer
 /// </summary>
 /// <typeparam name="TSource">The type of the elements of source</typeparam>
 /// <param name="source">An sequence in which to locate item</param>
 /// <param name="item">The object to locate in the sequence</param>
 /// <returns>
 /// true if the input sequence contains an element that has the specified value;
 /// otherwise, false
 /// </returns>
 public static Task <bool> ContainsAsync <TSource>(this IQueryable <TSource> source, TSource item)
 {
     return(AsyncExtensions.ContainsAsync(source, item));
 }