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)); }
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); }