修改一版

Uat_Study
he 2022-04-19 15:44:55 +08:00
parent 65449a9868
commit 339736dea5
1 changed files with 2 additions and 3 deletions

View File

@ -192,7 +192,7 @@ namespace IRaCIS.Core.Infra.EFCore
/// <returns></returns>
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<bool> SaveChangesAsync(CancellationToken cancellationToken = default)
{
return await _dbContext.SaveChangesAsync(cancellationToken) > 0;
}
public async ValueTask<TEntity> FindAsync(Guid id, CancellationToken cancellationToken = default)
@ -795,6 +793,7 @@ namespace IRaCIS.Core.Infra.EFCore
{
var entity = _mapper.Map<TEntity>(from);
foreach (var verifyItem in verify.Where(t => t.verifyType != VerifyEnum.OnlyUpdate && t.IsVerify))
{
if (await _dbSet.IgnoreQueryFilters().AnyAsync(verifyItem.VerifyExp).ConfigureAwait(false))