😎 优化事件总线数据库存储
This commit is contained in:
parent
85d02a8997
commit
e38e533221
@ -26,8 +26,8 @@ public class AppEventSubscriber : IEventSubscriber, ISingleton, IDisposable
|
||||
[EventSubscribe(CommonConst.AddExLog)]
|
||||
public async Task CreateExLog(EventHandlerExecutingContext context)
|
||||
{
|
||||
var rep = _serviceScope.ServiceProvider.GetRequiredService<SqlSugarRepository<SysLogEx>>();
|
||||
await rep.InsertAsync((SysLogEx)context.Source.Payload);
|
||||
var db = _serviceScope.ServiceProvider.GetRequiredService<ISqlSugarClient>();
|
||||
await db.CopyNew().Insertable((SysLogEx)context.Source.Payload).ExecuteCommandAsync();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user