public async void SyncAllEmployees() { string url = "http://172.18.12.209/api/ClientData/SyncAllEmployees"; using (var client = new HttpClient()) { var response = await client.GetAsync(url); if (response.IsSuccessStatusCode) { string result = await response.Content.ReadAsStringAsync(); var rootresult = JsonConvert.DeserializeObject <List <Employee> >(result); await EmployeeSync.InsertUpdateEmployeeDetails(rootresult); } } }
public async void RecieveEmployeeDetails([FromBody] List <Employee> employeeDetails) { await EmployeeSync.InsertUpdateEmployeeDetails(employeeDetails); }