diff --git a/FreeSql/Extensions/FreeSqlGlobalExtensions.cs b/FreeSql/Extensions/FreeSqlGlobalExtensions.cs
index ac2b6454a..e471a6673 100644
--- a/FreeSql/Extensions/FreeSqlGlobalExtensions.cs
+++ b/FreeSql/Extensions/FreeSqlGlobalExtensions.cs
@@ -1144,6 +1144,19 @@ public UpdateDictImpl WherePrimary(params string[] primarys)
_updateProvider._tempPrimarys = GetPrimarys(_updateProvider._table, primarys);
return this;
}
+ ///
+ /// 原生sql语法条件,Where("col = @xxx", new { xxx = 1 })
+ /// 提示:parms 参数还可以传 Dictionary<string, object>
+ ///
+ /// sql语法条件
+ /// 参数
+ ///
+ public UpdateDictImpl Where(string sql, object parms = null)
+ {
+ _updateProvider.Where(sql, parms);
+ return this;
+ }
+
public static ColumnInfo[] GetPrimarys(TableInfo table, params string[] primarys)
{
if (primarys?.Any() != true) throw new ArgumentException(nameof(primarys));
@@ -1321,6 +1334,19 @@ public DeleteDictImpl AsTable(string tableName)
return this;
}
+ ///
+ /// 原生sql语法条件,Where("col = @xxx", new { xxx = 1 })
+ /// 提示:parms 参数还可以传 Dictionary<string, object>
+ ///
+ /// sql语法条件
+ /// 参数
+ ///
+ public DeleteDictImpl Where(string sql, object parms = null)
+ {
+ _deleteProvider.Where(sql, parms);
+ return this;
+ }
+
public DeleteDictImpl CommandTimeout(int timeout)
{
_deleteProvider.CommandTimeout(timeout);
diff --git a/FreeSql/FreeSql.xml b/FreeSql/FreeSql.xml
index efb7c9fa4..a656490ce 100644
--- a/FreeSql/FreeSql.xml
+++ b/FreeSql/FreeSql.xml
@@ -6112,6 +6112,24 @@
+
+
+ 原生sql语法条件,Where("col = @xxx", new { xxx = 1 })
+ 提示:parms 参数还可以传 Dictionary<string, object>
+
+ sql语法条件
+ 参数
+
+
+
+
+ 原生sql语法条件,Where("col = @xxx", new { xxx = 1 })
+ 提示:parms 参数还可以传 Dictionary<string, object>
+
+ sql语法条件
+ 参数
+
+
使用 and 拼接两个 lambda 表达式