다음을 통해 공유


RoleStore<TRole,TContext,TKey,TUserRole,TRoleClaim>.FindByIdAsync 메서드

정의

지정된 ID를 비동기 작업으로 가진 역할을 찾습니다.

public virtual System.Threading.Tasks.Task<TRole> FindByIdAsync (string id, System.Threading.CancellationToken cancellationToken = default);
public virtual System.Threading.Tasks.Task<TRole?> FindByIdAsync (string id, System.Threading.CancellationToken cancellationToken = default);
abstract member FindByIdAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'Role (requires 'Role :> Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole<'Key, 'UserRole, 'RoleClaim>)>
override this.FindByIdAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'Role (requires 'Role :> Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole<'Key, 'UserRole, 'RoleClaim>)>
abstract member FindByIdAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'Role (requires 'Role :> Microsoft.AspNetCore.Identity.IdentityRole<'Key>)>
override this.FindByIdAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'Role (requires 'Role :> Microsoft.AspNetCore.Identity.IdentityRole<'Key>)>
Public Overridable Function FindByIdAsync (id As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of TRole)

매개 변수

id
String

찾을 역할 ID입니다.

cancellationToken
CancellationToken

작업을 취소해야 하는 알림을 전파하는 데 사용하는 CancellationToken입니다.

반환

Task<TRole>

Task<TResult> 조회의 결과입니다.

구현

적용 대상