mirror of
				https://github.com/nsnail/FreeSql.git
				synced 2025-11-04 17:20:49 +08:00 
			
		
		
		
	为所有数据库 CodeFirst 中的 LocalExecuteScalar 增加 AOP
This commit is contained in:
		@@ -186,7 +186,9 @@ namespace FreeSql.GBase
 | 
			
		||||
                    using (var cmd = conn.Value.CreateCommand())
 | 
			
		||||
                    {
 | 
			
		||||
                        cmd.CommandText = sql;
 | 
			
		||||
                        cmd.CommandType = CommandType.Text;
 | 
			
		||||
                        cmd.CommandType = CommandType.Text; 
 | 
			
		||||
                        var before = new Aop.CommandBeforeEventArgs(cmd);
 | 
			
		||||
                        this._orm?.Aop.CommandBeforeHandler?.Invoke(this._orm, before);
 | 
			
		||||
                        return cmd.ExecuteScalar();
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user