Files
Yi.Admin/Yi.Abp.Net8/module/audit-logging/Yi.AuditLogging.SqlSugarCore/YiAuditLoggingSqlSugarCoreModule.cs
2023-12-28 20:24:49 +08:00

22 lines
825 B
C#

using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Volo.Abp.AuditLogging;
using Volo.Abp.AuditLogging.EntityFrameworkCore;
using Volo.Abp.Modularity;
using Yi.Framework.SqlSugarCore;
namespace Yi.AuditLogging.SqlSugarCore
{
[DependsOn(typeof(AbpAuditLoggingDomainModule))]
[DependsOn(typeof(YiFrameworkSqlSugarCoreModule))]
public class YiAuditLoggingSqlSugarCoreModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.Replace(new ServiceDescriptor(typeof(IAuditLogRepository), typeof(SqlSugarCoreAuditLogRepository), lifetime: ServiceLifetime.Transient));
context.Services.AddYiDbContext<YiAuditLoggingDbContext>();
}
}
}