using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace SqlSugar { public class AopProvider { private AopProvider() { } public AopProvider(SqlSugarProvider context) { this.Context = context; this.Context.Ado.IsEnableLogEvent = true; } private SqlSugarProvider Context { get; set; } public Action OnDiffLogEvent { set { this.Context.CurrentConnectionConfig.AopEvents.OnDiffLogEvent = value; } } public Action OnError { set { this.Context.CurrentConnectionConfig.AopEvents.OnError = value; } } public Action OnLogExecuting { set { this.Context.CurrentConnectionConfig.AopEvents.OnLogExecuting= value; } } public Action OnLogExecuted { set { this.Context.CurrentConnectionConfig.AopEvents.OnLogExecuted = value; } } public Func> OnExecutingChangeSql { set { this.Context.CurrentConnectionConfig.AopEvents.OnExecutingChangeSql = value; } } } }