src/Folke.Identity.Elm/UserStore.cs
/// <summary>
///     Get all users with given claim
/// </summary>
/// <param name="claim"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
Get all users with given claim
Get all users with given claim
public virtual async Task<IList<TUser>> GetUsersForClaimAsync(Claim claim, CancellationToken cancellationToken = default(CancellationToken))
        {
            cancellationToken.ThrowIfCancellationRequested();
            ThrowIfDisposed();
            if (claim == null)
            {
                throw new ArgumentNullException(nameof(claim));
            }
            IdentityUserClaim<TUser, TKey> userClaim = null;
            var query =
                await
                    connection.Select<TUser>()
                        .All()
                        .From()
                        .LeftJoin(x => userClaim)
                        .On(x => x == userClaim.User)
                        .Where(x => userClaim.ClaimType == claim.Type && userClaim.ClaimValue == claim.Value)
                        .ToListAsync();
            return query;
        }
public virtual async Task < IList < TUser > > GetUsersForClaimAsync ( Claim claim , CancellationToken cancellationToken = default ( CancellationToken ) ) { cancellationToken . ThrowIfCancellationRequested ( ) ; ThrowIfDisposed ( ) ; if ( claim == null ) { throw new ArgumentNullException ( nameof ( claim ) ) ; } IdentityUserClaim < TUser , TKey > userClaim = null ; var query = await connection . Select < TUser > ( ) . All ( ) . From ( ) . LeftJoin ( x => userClaim ) . On ( x => x == userClaim . User ) . Where ( x => userClaim . ClaimType == claim . Type && userClaim . ClaimValue == claim . Value ) . ToListAsync ( ) ; return query ; }
Get all users with given claim
Get all users with given claim
None
claim
Claim
None
cancellationToken
CancellationToken
None