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.
abp/modules/tenant-management/test/Volo.Abp.TenantManagement.A.../Volo/Abp/TenantManagement/AbpTenantManagementApplicat...

25 lines
794 B

using System;
using Volo.Abp.TenantManagement.EntityFrameworkCore;
namespace Volo.Abp.TenantManagement
{
public abstract class AbpTenantManagementApplicationTestBase : TenantManagementTestBase<AbpTenantManagementApplicationTestModule>
{
protected virtual void UsingDbContext(Action<ITenantManagementDbContext> action)
{
using (var dbContext = GetRequiredService<ITenantManagementDbContext>())
{
action.Invoke(dbContext);
}
}
protected virtual T UsingDbContext<T>(Func<ITenantManagementDbContext, T> action)
{
using (var dbContext = GetRequiredService<ITenantManagementDbContext>())
{
return action.Invoke(dbContext);
}
}
}
}