2023-12-28 20:24:49 +08:00
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
|
using Microsoft.Extensions.DependencyInjection.Extensions;
|
|
|
|
|
|
using Volo.Abp.AuditLogging;
|
2023-12-28 15:23:00 +08:00
|
|
|
|
using Volo.Abp.Modularity;
|
|
|
|
|
|
using Yi.Framework.SqlSugarCore;
|
2023-12-27 18:59:26 +08:00
|
|
|
|
|
2023-12-28 15:23:00 +08:00
|
|
|
|
namespace Yi.AuditLogging.SqlSugarCore
|
|
|
|
|
|
{
|
|
|
|
|
|
[DependsOn(typeof(AbpAuditLoggingDomainModule))]
|
|
|
|
|
|
[DependsOn(typeof(YiFrameworkSqlSugarCoreModule))]
|
|
|
|
|
|
public class YiAuditLoggingSqlSugarCoreModule : AbpModule
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void ConfigureServices(ServiceConfigurationContext context)
|
|
|
|
|
|
{
|
2023-12-28 20:24:49 +08:00
|
|
|
|
context.Services.Replace(new ServiceDescriptor(typeof(IAuditLogRepository), typeof(SqlSugarCoreAuditLogRepository), lifetime: ServiceLifetime.Transient));
|
2023-12-28 15:23:00 +08:00
|
|
|
|
context.Services.AddYiDbContext<YiAuditLoggingDbContext>();
|
2023-12-28 20:24:49 +08:00
|
|
|
|
|
2023-12-28 15:23:00 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|