Abp Vnext 的 Vue3 实现版本
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.
 
 
 
 
 
 

29 lines
1.1 KiB

namespace Lion.AbpPro.DataDictionaryManagement
{
public abstract class DataDictionaryDomainService : DomainService
{
protected Type ObjectMapperContext { get; set; }
/// <summary>
/// 工作单元管理器
/// </summary>
protected IUnitOfWorkManager UnitOfWorkManager =>
LazyServiceProvider.LazyGetRequiredService<IUnitOfWorkManager>();
/// <summary>
/// 分布式事件总线
/// </summary>
protected IDistributedEventBus DistributedEventBus =>
LazyServiceProvider.LazyGetRequiredService<IDistributedEventBus>();
/// <summary>
/// 对象映射器
/// </summary>
protected IObjectMapper ObjectMapper => LazyServiceProvider.LazyGetService<IObjectMapper>(
provider =>
ObjectMapperContext == null
? provider.GetRequiredService<IObjectMapper>()
: (IObjectMapper)provider.GetRequiredService(
typeof(IObjectMapper<>).MakeGenericType(ObjectMapperContext)));
}
}