public async Task UpdateBranch(List <Guid> branchIdList) { var branchList = _dataService.GetEntity <Branch>(x => branchIdList.Contains(x.Id) && x.CreateTds == false).ToList(); if (branchList.Any()) { branchList.ForEach(x => x.CreateDls = true); try { await _limsExchangeService.CreateDlsAsync(branchIdList); } catch (Exception e) { branchList.ForEach(x => x.CreateTds = false); } await _dataService.SaveChangesAsync(); } }