Open Source Web Application Framework for ASP.NET Core
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

23 lines
725 B

using System;
using Volo.Abp.PermissionManagement.EntityFrameworkCore;
namespace Volo.Abp.PermissionManagement;
public abstract class PermissionTestBase : PermissionManagementTestBase<AbpPermissionManagementTestModule>
{
protected virtual void UsingDbContext(Action<IPermissionManagementDbContext> action)
{
using (var dbContext = GetRequiredService<IPermissionManagementDbContext>())
{
action.Invoke(dbContext);
}
}
protected virtual T UsingDbContext<T>(Func<IPermissionManagementDbContext, T> action)
{
using (var dbContext = GetRequiredService<IPermissionManagementDbContext>())
{
return action.Invoke(dbContext);
}
}
}