public async Task <IGraphActionResult> GlobalSearch(string searchText = "*") { var characters = await _starWarsData.SearchCharacters(searchText).ConfigureAwait(false); var ships = await _starWarsData.SearchStarships(searchText).ConfigureAwait(false); var data = characters.Cast <object>().Concat(ships).ToList(); return(this.Ok(data)); }
public async Task <IGraphActionResult> SearchStarships(string searchText = "*") { var starships = await _starWarsData.SearchStarships(searchText).ConfigureAwait(false); return(this.Ok(starships)); }