public async Task <dynamic> Get(string companyName) { if (CheckClientSecret()) { try { using (HttpClient client = new HttpClient()) using (Entities db = new Entities()) { CompanyRoot.Company company = await CompanySearch.GetCompany(client, companyName, db); ContactRoot.Contact contact = await ContactSearch.GetContacts(client, company.Results.FirstOrDefault()); return(ContactSearch.CreateContactDTOs(contact)); } } catch (Exception ex) { return(ex); } } else { return(new HttpResponseMessage(System.Net.HttpStatusCode.Forbidden)); } }