public override async Task <IList <string> > GetRolesAsync(User user, CancellationToken cancellationToken = default) { cancellationToken.ThrowIfCancellationRequested(); var result = await _usersRoles.GetRolesAsync(user.Id, _roles, cancellationToken); return(result.Select(x => x.Name).ToList()); }
public Task <IList <string> > GetRolesAsync(BL.Models.User user, CancellationToken cancellationToken) { if (user == null) { throw new ArgumentNullException(nameof(user), "Parameter user is not set to an instance of an object."); } return(_usersRolesRepository.GetRolesAsync(_mapper.Map <DL.Models.User>(user), cancellationToken)); }
public Task <IList <string> > GetRolesAsync(User user, CancellationToken cancellationToken) { if (user == null) { throw new ArgumentNullException(nameof(user), "Parameter user is not set to an instance of an object."); } var roles = _usersRolesRepository.GetRolesAsync(user, cancellationToken); return(roles); }