public async Task <IActionResult> Search(string artist) { try { var recommendationResult = await _recommendationService.RecommendationByArtist(artist); var searchResultVm = _searchResultMapper.MapToViewModel(recommendationResult); return(View(searchResultVm)); } catch (System.Exception) { //log exception return(RedirectToAction("Error")); } }
protected override void When() { _searchResultVm = _searchResultMapper.MapToViewModel(_recommendationResult); }