Browse Source

Merge pull request #4704 from abpframework/liangshiwei/patch-1

Use CompleteAsync instead of SaveChangesAsync
pull/4715/head
maliming 6 years ago
committed by GitHub
parent
commit
de4c1b26c5
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      modules/audit-logging/src/Volo.Abp.AuditLogging.Domain/Volo/Abp/AuditLogging/AuditingStore.cs
  2. 6
      modules/users/src/Volo.Abp.Users.Domain/Volo/Abp/Users/UserLookupService.cs

4
modules/audit-logging/src/Volo.Abp.AuditLogging.Domain/Volo/Abp/AuditLogging/AuditingStore.cs

@ -57,8 +57,8 @@ namespace Volo.Abp.AuditLogging
using (var uow = UnitOfWorkManager.Begin(true))
{
await AuditLogRepository.InsertAsync(new AuditLog(GuidGenerator, auditInfo));
await uow.SaveChangesAsync();
await uow.CompleteAsync();
}
}
}
}
}

6
modules/users/src/Volo.Abp.Users.Domain/Volo/Abp/Users/UserLookupService.cs

@ -167,14 +167,14 @@ namespace Volo.Abp.Users
filter,
cancellationToken
);
return localUsers
.Cast<IUserData>()
.ToList();
}
public async Task<long> GetCountAsync(
string filter = null,
string filter = null,
CancellationToken cancellationToken = default)
{
if (ExternalUserLookupServiceProvider != null)
@ -200,7 +200,7 @@ namespace Volo.Abp.Users
using (var uow = _unitOfWorkManager.Begin(requiresNew: true))
{
await func();
await uow.SaveChangesAsync();
await uow.CompleteAsync();
}
}
}

Loading…
Cancel
Save