언어

EntityFrameworkQueryableExtensions.ToHashSetAsync 메서드

정의

오버로드

속성 Description
ToHashSetAsync<TSource>(IQueryable<TSource>, CancellationToken)

비동기적으로 열거하여 A로부터 IQueryable<T> 비동기적으로 만듭니다HashSet<T>.

ToHashSetAsync<TSource>(IQueryable<TSource>, IEqualityComparer<TSource>, CancellationToken)

비동기적으로 열거하여 A로부터 IQueryable<T> 비동기적으로 만듭니다HashSet<T>.

ToHashSetAsync<TSource>(IQueryable<TSource>, CancellationToken)

Source:
EntityFrameworkQueryableExtensions.cs
Source:
EntityFrameworkQueryableExtensions.cs
Source:
EntityFrameworkQueryableExtensions.cs

비동기적으로 열거하여 A로부터 IQueryable<T> 비동기적으로 만듭니다HashSet<T>.

public static System.Threading.Tasks.Task<System.Collections.Generic.HashSet<TSource>> ToHashSetAsync<TSource>(this System.Linq.IQueryable<TSource> source, System.Threading.CancellationToken cancellationToken = default);
static member ToHashSetAsync : System.Linq.IQueryable<'Source> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.HashSet<'Source>>
<Extension()>
Public Function ToHashSetAsync(Of TSource) (source As IQueryable(Of TSource), Optional cancellationToken As CancellationToken = Nothing) As Task(Of HashSet(Of TSource))

형식 매개 변수

TSource

의 요소 형식입니다 source.

매개 변수

source
IQueryable<TSource>

IQueryable<T> 집합을 만들려는 항목입니다.

cancellationToken
CancellationToken

CancellationToken 작업이 완료 될 때까지 기다리는 동안 관찰할 A입니다.

반품

Task<HashSet<TSource>>

비동기 연산을 나타내는 작업입니다. 작업 결과에는 HashSet<T> 입력 시퀀스의 요소가 포함된 항목이 포함됩니다.

예외

source은 null입니다.

설명

동일한 컨텍스트 인스턴스에서 여러 활성 작업은 지원되지 않습니다. 이 컨텍스트에서 다른 메서드를 호출하기 전에 비동기 작업이 완료되었는지 확인하는 데 사용합니다 await . 자세한 내용 및 예제 는 DbContext 스레딩 문제 방지 를 참조하세요.

자세한 내용 및 예제는 EF Core를 사용하여 데이터 쿼리를 참조하세요.

적용 대상

ToHashSetAsync<TSource>(IQueryable<TSource>, IEqualityComparer<TSource>, CancellationToken)

Source:
EntityFrameworkQueryableExtensions.cs
Source:
EntityFrameworkQueryableExtensions.cs
Source:
EntityFrameworkQueryableExtensions.cs

비동기적으로 열거하여 A로부터 IQueryable<T> 비동기적으로 만듭니다HashSet<T>.

public static System.Threading.Tasks.Task<System.Collections.Generic.HashSet<TSource>> ToHashSetAsync<TSource>(this System.Linq.IQueryable<TSource> source, System.Collections.Generic.IEqualityComparer<TSource>? comparer, System.Threading.CancellationToken cancellationToken = default);
static member ToHashSetAsync : System.Linq.IQueryable<'Source> * System.Collections.Generic.IEqualityComparer<'Source> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.HashSet<'Source>>
<Extension()>
Public Function ToHashSetAsync(Of TSource) (source As IQueryable(Of TSource), comparer As IEqualityComparer(Of TSource), Optional cancellationToken As CancellationToken = Nothing) As Task(Of HashSet(Of TSource))

형식 매개 변수

TSource

의 요소 형식입니다 source.

매개 변수

source
IQueryable<TSource>

IQueryable<T> 집합을 만들려는 항목입니다.

comparer
IEqualityComparer<TSource>

IEqualityComparer<T> 집합의 값을 비교할 때 사용할 구현이거나, 집합 형식에 대한 기본 EqualityComparer<T> 구현을 사용하기 위해 null입니다.

cancellationToken
CancellationToken

CancellationToken 작업이 완료 될 때까지 기다리는 동안 관찰할 A입니다.

반품

Task<HashSet<TSource>>

비동기 연산을 나타내는 작업입니다. 작업 결과에는 HashSet<T> 입력 시퀀스의 요소가 포함된 항목이 포함됩니다.

예외

source은 null입니다.

설명

동일한 컨텍스트 인스턴스에서 여러 활성 작업은 지원되지 않습니다. 이 컨텍스트에서 다른 메서드를 호출하기 전에 비동기 작업이 완료되었는지 확인하는 데 사용합니다 await . 자세한 내용 및 예제 는 DbContext 스레딩 문제 방지 를 참조하세요.

자세한 내용 및 예제는 EF Core를 사용하여 데이터 쿼리를 참조하세요.

적용 대상