public async Task <BaseSearchResults <UserDto> > Search(BaseSearchOptionsDto searchOptions, string userId) { var userResults = await _userManager.Search(searchOptions.SearchTerm, userId); var searchResult = new BaseSearchResults <UserDto> { Results = Mapper.Map <List <UserDto> >(userResults) }; return(searchResult); }
public async Task <IActionResult> Search([FromQuery] BaseSearchOptionsDto searchOptions) { var result = await _profileService.Search(searchOptions, UserId); return(Ok(result)); }