public HttpResponseMessage Index() { try { var httpResponse = new HttpResponseMessage(); var awaitFeatureCollection = Task.Run(async() => { return(await _featureDataService.GetAllFeatures()); }); var features = awaitFeatureCollection.Result.ToList(); var menuOptionList = _menuDataService.GetAllMenu(); var menuOptionVM = _menuMapper.ToObjects(menuOptionList) .ToList(); menuOptionVM .ForEach(x => x.URLPath = features.Find(f => f.Id == x.FeatureId).ProgramLink); return(httpResponse); } catch (Exception ex) { return(null); } }