Files
Yi.Admin/Yi.Abp.Net8/module/audit-logging/Yi.AuditLogging.SqlSugarCore/YiAuditLoggingSqlSugarCoreModule.cs

22 lines
825 B
C#
Raw Normal View History

2023-12-28 20:24:49 +08:00
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Volo.Abp.AuditLogging;
using Volo.Abp.AuditLogging.EntityFrameworkCore;
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
}
}
}