using System; using System.Collections.Generic; using System.Linq; using Volo.Abp.AuditLogging.EntityFrameworkCore; namespace Volo.Abp.AuditLogging { public class AuditLogsTestBase : AuditLoggingTestBase { protected virtual void UsingDbContext(Action action) { using (var dbContext = GetRequiredService()) { action.Invoke(dbContext); } } protected virtual T UsingDbContext(Func action) { using (var dbContext = GetRequiredService()) { return action.Invoke(dbContext); } } protected List GetAuditLogsFromDbContext() { return UsingDbContext(context => context.AuditLogs.IncludeDetails().ToList() ); } } }