diff --git a/IRaCIS.Core.Application/Service/Common/DictionaryService.cs b/IRaCIS.Core.Application/Service/Common/DictionaryService.cs index de7f053be..7ca8b2ea5 100644 --- a/IRaCIS.Core.Application/Service/Common/DictionaryService.cs +++ b/IRaCIS.Core.Application/Service/Common/DictionaryService.cs @@ -63,7 +63,7 @@ namespace IRaCIS.Application.Services { var entity = await _dicRepository.InsertDictionaryAsync(addOrEditBasic); - await _dicRepository.UpdateFromQueryAsync(t => t.ParentId == Guid.Empty, + await _dicRepository.UpdateFromQueryAsync(t => t.ParentId == Guid.Empty, u => new Dictionary() { ParentId = null }); return ResponseOutput.Ok(entity.Id.ToString()); @@ -71,6 +71,9 @@ namespace IRaCIS.Application.Services else { var entity = await _dicRepository.InsertOrUpdateAsync(addOrEditBasic, true); + await _dicRepository.UpdateFromQueryAsync(t => t.ParentId == Guid.Empty, + u => new Dictionary() { ParentId = null }); + return ResponseOutput.Ok(entity.Id.ToString()); } //var entity = await _dicRepository.InsertOrUpdateAsync(addOrEditBasic, true);