diff --git a/IRaCIS.Core.Application/Service/Document/SystemDocumentService.cs b/IRaCIS.Core.Application/Service/Document/SystemDocumentService.cs index 1a0d8070c..4c232f8f2 100644 --- a/IRaCIS.Core.Application/Service/Document/SystemDocumentService.cs +++ b/IRaCIS.Core.Application/Service/Document/SystemDocumentService.cs @@ -168,19 +168,18 @@ namespace IRaCIS.Core.Application.Services [HttpPost] public async Task PublishSystemDocument(PublishSystemDocumentInDto inDto) { - await _systemDocumentRepository.UpdatePartialFromQueryAsync(x => inDto.Ids.Contains(x.Id), x => new SystemDocument() + await _systemDocumentRepository.BatchUpdateNoTrackingAsync(x => inDto.Ids.Contains(x.Id), x => new SystemDocument() { IsPublish = true, IsDeleted = false, }); - var result = await _systemDocumentRepository.SaveChangesAsync(); await _mediatorScoped.Publish(new SystemDocumentPublishEvent() { Ids = inDto.Ids }); - return ResponseOutput.Result(result); + return ResponseOutput.Result(true); } ///