Esempio n. 1
0
        public override Task <IdentityUserNav <TKey> > FindByIdAsync(string userId, CancellationToken cancellationToken = default)
        {
            cancellationToken.ThrowIfCancellationRequested();
            ThrowIfDisposed();
            var id = ConvertIdFromString(userId);

            return(UsersSet.FirstOrDefaultAsync(x => x.Id.Equals(new object[] { id }), cancellationToken));
        }
Esempio n. 2
0
 public override Task <User> FindByIdAsync(string userId, CancellationToken cancellationToken = default(CancellationToken))
 {
     cancellationToken.ThrowIfCancellationRequested();
     ThrowIfDisposed();
     if (Guid.TryParse(userId, out var id))
     {
         return(UsersSet.FirstOrDefaultAsync(f => f.Id == id, cancellationToken));
     }
     return(null);
 }