public async Task UploadContractorData() { ContractorDataService contractordataservice = new ContractorDataService(); IEnumerable <Contractor> list = contractorDatabase.GetContractors(Settings.GeneralSettings); if (list != null && list.Count() > 0) { foreach (Contractor item in list) { var result = await contractordataservice.AddContractor(item); if (result != null) { contractorDatabase.DeleteContractor(item.Id); } } } }