Example #1
0
 /// <summary>
 /// Searchs for user accounts by their nametag and returns them.
 /// </summary>
 /// <param name="query">The search input.</param>
 /// <returns>The user accounts that match the specified query.</returns>
 public async Task <IEnumerable <ApplicationUser> > SearchUsers(SearchAccountsDto searchAccountsDto)
 => await _accountRepository.SearchAsync(searchAccountsDto.Query, searchAccountsDto);
Example #2
0
        public async Task <IActionResult> Index([FromQuery] SearchAccountsDto search)
        {
            var entities = await _accountService.SearchUsers(search);

            return(Ok(new { users = entities.Select(ApplicationUserViewModel.FromEntity) }));
        }