diff --git a/FreeSql.DbContext/FreeSql.DbContext.xml b/FreeSql.DbContext/FreeSql.DbContext.xml
index 2735cefb..ca7c357b 100644
--- a/FreeSql.DbContext/FreeSql.DbContext.xml
+++ b/FreeSql.DbContext/FreeSql.DbContext.xml
@@ -110,6 +110,13 @@
清空状态数据
+
+
+ 根据 lambda 条件删除数据
+
+
+
+
添加
diff --git a/FreeSql/FreeSql.xml b/FreeSql/FreeSql.xml
index 08d2c1b3..784479be 100644
--- a/FreeSql/FreeSql.xml
+++ b/FreeSql/FreeSql.xml
@@ -2260,137 +2260,6 @@
-
-
- 查询,若使用读写分离,查询【从库】条件cmdText.StartsWith("SELECT "),否则查询【主库】
-
-
-
-
-
-
-
-
- 查询,ExecuteReaderAsync(dr => {}, "select * from user where age > ?age", new { age = 25 })
-
-
-
-
-
-
- 查询
-
-
-
-
-
-
- 查询,ExecuteArrayAsync("select * from user where age > ?age", new { age = 25 })
-
-
-
-
-
-
-
- 查询
-
-
-
-
-
-
- 查询,ExecuteDataSetAsync("select * from user where age > ?age; select 2", new { age = 25 })
-
-
-
-
-
-
-
- 查询
-
-
-
-
-
-
- 查询,ExecuteDataTableAsync("select * from user where age > ?age", new { age = 25 })
-
-
-
-
-
-
-
- 在【主库】执行
-
-
-
-
-
-
-
- 在【主库】执行,ExecuteNonQueryAsync("delete from user where age > ?age", new { age = 25 })
-
-
-
-
-
-
-
- 在【主库】执行
-
-
-
-
-
-
-
- 在【主库】执行,ExecuteScalarAsync("select 1 from user where age > ?age", new { age = 25 })
-
-
-
-
-
-
-
- 执行SQL返回对象集合,QueryAsync<User>("select * from user where age > ?age", new SqlParameter { ParameterName = "age", Value = 25 })
-
-
-
-
-
-
-
-
-
- 执行SQL返回对象集合,QueryAsync<User>("select * from user where age > ?age", new { age = 25 })
-
-
-
-
-
-
-
-
- 执行SQL返回对象集合,Query<User>("select * from user where age > ?age; select * from address", new SqlParameter { ParameterName = "age", Value = 25 })
-
-
-
-
-
-
-
-
-
- 执行SQL返回对象集合,Query<User>("select * from user where age > ?age; select * from address", new { age = 25 })
-
-
-
-
-
-
可自定义解析表达式
diff --git a/FreeSql/FreeSqlBuilder.cs b/FreeSql/FreeSqlBuilder.cs
index 9309609d..26720246 100644
--- a/FreeSql/FreeSqlBuilder.cs
+++ b/FreeSql/FreeSqlBuilder.cs
@@ -249,14 +249,16 @@ namespace FreeSql
ret.CodeFirst.IsGenerateCommandParameterWithLambda = _isGenerateCommandParameterWithLambda;
ret.CodeFirst.IsLazyLoading = _isLazyLoading;
- ret.Aop.CommandBefore += new EventHandler((s, e) =>
- {
- _aopCommandExecuting(e.Command);
- });
- ret.Aop.CommandAfter += new EventHandler((s, e) =>
- {
- _aopCommandExecuted(e.Command, e.Log);
- });
+ if (_aopCommandExecuting != null)
+ ret.Aop.CommandBefore += new EventHandler((s, e) =>
+ {
+ _aopCommandExecuting?.Invoke(e.Command);
+ });
+ if (_aopCommandExecuted != null)
+ ret.Aop.CommandAfter += new EventHandler((s, e) =>
+ {
+ _aopCommandExecuted?.Invoke(e.Command, e.Log);
+ });
//添加实体属性名全局AOP转换处理
if (_entityPropertyConvertType != StringConvertType.None)