From 339736dea55afd1f6d7ed3c64f6709422164e8b0 Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Tue, 19 Apr 2022 15:44:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=80=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Infra.EFCore/Repository/Repository.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/IRaCIS.Core.Infra.EFCore/Repository/Repository.cs b/IRaCIS.Core.Infra.EFCore/Repository/Repository.cs index 950d63dcb..53fea6784 100644 --- a/IRaCIS.Core.Infra.EFCore/Repository/Repository.cs +++ b/IRaCIS.Core.Infra.EFCore/Repository/Repository.cs @@ -192,7 +192,7 @@ namespace IRaCIS.Core.Infra.EFCore /// private bool IsNullOrEmpty(object value) { - if (value.ToString() == null || value.ToString() == string.Empty) + if (value==null || value.ToString() == string.Empty) { return true; } @@ -514,9 +514,7 @@ namespace IRaCIS.Core.Infra.EFCore public async Task SaveChangesAsync(CancellationToken cancellationToken = default) { - return await _dbContext.SaveChangesAsync(cancellationToken) > 0; - } public async ValueTask FindAsync(Guid id, CancellationToken cancellationToken = default) @@ -795,6 +793,7 @@ namespace IRaCIS.Core.Infra.EFCore { var entity = _mapper.Map(from); + foreach (var verifyItem in verify.Where(t => t.verifyType != VerifyEnum.OnlyUpdate && t.IsVerify)) { if (await _dbSet.IgnoreQueryFilters().AnyAsync(verifyItem.VerifyExp).ConfigureAwait(false))