EmployeeDTO GetEmployeeSyncById(string path, double empId) { List <EmployeeDTO> employeeList = null; string employeeString = string.Empty; HttpResponseMessage response = testAPIclient.GetAsync(path).Result; if (response.IsSuccessStatusCode) { employeeString = (response.Content).ReadAsStringAsync().Result; } employeeList = DataLayerHelperClass.DeserializeObjectEmployee(employeeString); return(employeeList.Where(x => x.id == empId).FirstOrDefault()); }
List <EmployeeDTO> GetEmployeeSync(string path) { List <EmployeeDTO> employeeList = null; string employeeString = string.Empty; HttpResponseMessage response = testAPIclient.GetAsync(path).Result; if (response.IsSuccessStatusCode) { employeeString = (response.Content).ReadAsStringAsync().Result; } employeeList = DataLayerHelperClass.DeserializeObjectEmployee(employeeString); return(employeeList); }