Ejemplo n.º 1
0
        public async Task ProcessBingSearchData()
        {
            IDataAccess dataAccess = DataAccess.GetInstance();
            IEnumerable <ProspectSearchCriteria> searchCriteriaList = await dataAccess.GetProspectSearchCriteriaAsync();

            foreach (ProspectSearchCriteria searchCriteria in searchCriteriaList)
            {
                string           searchString = searchCriteria.ProspectName + " + " + searchCriteria.SearchString;
                BingSearchResult searchResult = BingSearch.WebSearch(searchString);
                InsertBingDataAsync(searchResult.jsonResult, searchCriteria.ProspectName, searchCriteria.SearchString).Wait();
            }
        }
Ejemplo n.º 2
0
        public static async Task ProcessBingSearchData()
        {
            IEnumerable <ProspectSearchCriteria> searchdata = await CosmosRepository <ProspectSearchCriteria> .GetAllProspectsAsyncForBingSearch();

            foreach (var item in searchdata)
            {
                SearchResult result = BingSearch.WebSearch(item.ProspectName + " + " + item.SearchCriteria);

                //Insert data of bing search
                InsertBingDataAsync(result, item).Wait();
            }
            //Bing web search call
        }