예제 #1
0
        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));
        }
예제 #2
0
        public async Task <IGraphActionResult> SearchStarships(string searchText = "*")
        {
            var starships = await _starWarsData.SearchStarships(searchText).ConfigureAwait(false);

            return(this.Ok(starships));
        }