Beispiel #1
0
        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());
        }
Beispiel #2
0
        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);
        }