public async Task <ActionResult> Index(string docId) { if (string.IsNullOrEmpty(docId)) { return(new NotFoundResult()); } try { var result = await _service.GetApiInformationAsync(docId); return(View(result.Response)); } catch (Exception e) { Trace.WriteLine(e); return(new NotFoundResult()); } }
private static async Task<ApiInformation> GetApi(IApiPortService service, string apiDocId) { var response = await service.GetApiInformationAsync(apiDocId); return response.Response; }