public PartialViewResult Search(string topicDescription, bool showResolvedExercises = false) { var resultsViewModel = new ExerciseResultViewModel(); if (!string.IsNullOrEmpty(topicDescription)) { var topic = TopicService.GetByDescription(topicDescription); var exercises = ExerciseService.GetExercisesByTopic(topicDescription); var userId = User.Identity.GetUserId(); resultsViewModel.Exercises = ExerciseService.GetExerciseDTOsCards(userId, topic.TopicId, showResolvedExercises); resultsViewModel.TopicImageUrl = string.Concat(@"/Content/images/thumbnails/", topic.Description.Replace(' ', '_'), ".png"); } return(PartialView("_ExerciseSearchResult", resultsViewModel)); }