工具生成版本
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
using System.Threading.Tasks;
|
||||
using Volo.Abp.Data;
|
||||
using Volo.Abp.DependencyInjection;
|
||||
using Volo.Abp.MultiTenancy;
|
||||
|
||||
namespace Hua.Abp.Demo;
|
||||
|
||||
public class DemoTestDataSeedContributor : IDataSeedContributor, ITransientDependency
|
||||
{
|
||||
private readonly ICurrentTenant _currentTenant;
|
||||
|
||||
public DemoTestDataSeedContributor(ICurrentTenant currentTenant)
|
||||
{
|
||||
_currentTenant = currentTenant;
|
||||
}
|
||||
|
||||
public Task SeedAsync(DataSeedContext context)
|
||||
{
|
||||
/* Seed additional test data... */
|
||||
|
||||
using (_currentTenant.Change(context?.TenantId))
|
||||
{
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user