mirror of https://github.com/abpframework/abp
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.
25 lines
794 B
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);
|
|
}
|
|
}
|
|
}
|
|
}
|