public async Task <IActionResult> GetProduct(Int32 id) { var response = new SingleModelResponse <ProductViewModel>() as ISingleModelResponse <ProductViewModel>; try { response.Model = await Task.Run(() => { return(AdventureWorksRepository.GetProduct(id).ToViewModel()); }); } catch (Exception ex) { response.DidError = true; response.ErrorMessage = ex.Message; } return(response.ToHttpResponse()); }