zw
rszn 5 months ago
parent 831b81a074
commit 66f17cf266

@ -1,7 +1,6 @@
using System.Text;
using Autofac;
using Autofac.Extensions.DependencyInjection;
using Common.Util;
using Entity.Dto.Resp;
using HybirdFrameworkCore.Autofac;
using HybirdFrameworkCore.AutoTask;
@ -34,6 +33,13 @@ builder.Host.ConfigureContainer<ContainerBuilder>(cb =>
IsAutoCloseConnection = true,
InitKeyType = InitKeyType.Attribute // 如果使用实体类的属性进行主键标识,请设置为 InitKeyType.Attr
}, c =>
{
c.Aop.OnLogExecuting = (sql, pars) =>
{
string nativeSql = UtilMethods.GetNativeSql(sql, pars);
log.Info(nativeSql);
};
});
return db;
}).As<ISqlSugarClient>().SingleInstance();

Loading…
Cancel
Save