From d870c5e3e6316cc502d18d2058ef2b54bfc35127 Mon Sep 17 00:00:00 2001
From: 2881099 <2881099@qq.com>
Date: Sun, 14 Jan 2024 18:11:56 +0800
Subject: [PATCH] =?UTF-8?q?-=20=E4=BC=98=E5=8C=96=20=E8=A1=A8=E8=BE=BE?=
=?UTF-8?q?=E5=BC=8F=E6=A0=91=E8=A7=A3=E6=9E=90=EF=BC=9B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
FreeSql/FreeSql.xml | 112 +++++++++++++++++++++++++++
FreeSql/Internal/CommonExpression.cs | 4 +
2 files changed, 116 insertions(+)
diff --git a/FreeSql/FreeSql.xml b/FreeSql/FreeSql.xml
index 8adf6d85..489e88dd 100644
--- a/FreeSql/FreeSql.xml
+++ b/FreeSql/FreeSql.xml
@@ -6337,3 +6337,115 @@
+`0})">
+
+ 插入数据,传入实体集合
+
+
+
+
+
+
+
+ 插入或更新数据,此功能依赖数据库特性(低版本可能不支持),参考如下:
+ MySql 5.6+: on duplicate key update
+ PostgreSQL 9.4+: on conflict do update
+ SqlServer 2008+: merge into
+ Oracle 11+: merge into
+ Sqlite: replace into
+ 达梦: merge into
+ 人大金仓:on conflict do update
+ 神通:merge into
+ MsAccess:不支持
+ 注意区别:FreeSql.Repository 仓储也有 InsertOrUpdate 方法(不依赖数据库特性)
+
+
+
+
+
+
+ 修改数据
+
+
+
+
+
+
+ 修改数据,传入动态条件,如:主键值 | new[]{主键值1,主键值2} | TEntity1 | new[]{TEntity1,TEntity2} | new{id=1}
+
+
+ 主键值、主键值集合、实体、实体集合、匿名对象、匿名对象集合
+
+
+
+
+ 查询数据
+
+
+
+
+
+
+ 查询数据,传入动态条件,如:主键值 | new[]{主键值1,主键值2} | TEntity1 | new[]{TEntity1,TEntity2} | new{id=1}
+
+
+ 主键值、主键值集合、实体、实体集合、匿名对象、匿名对象集合
+
+
+
+
+ 删除数据
+
+
+
+
+
+
+ 删除数据,传入动态条件,如:主键值 | new[]{主键值1,主键值2} | TEntity1 | new[]{TEntity1,TEntity2} | new{id=1}
+
+
+ 主键值、主键值集合、实体、实体集合、匿名对象、匿名对象集合
+
+
+
+
+ 开启事务(不支持异步)
+ v1.5.0 关闭了线程事务超时自动提交的机制
+
+ 事务体 () => {}
+
+
+
+ 开启事务(不支持异步)
+ v1.5.0 关闭了线程事务超时自动提交的机制
+
+
+ 事务体 () => {}
+
+
+
+ 数据库访问对象
+
+
+
+
+ 所有拦截方法都在这里
+
+
+
+
+ CodeFirst 模式开发相关方法
+
+
+
+
+ DbFirst 模式开发相关方法
+
+
+
+
+ 全局过滤设置,可默认附加为 Select/Update/Delete 条件
+
+
+
+
diff --git a/FreeSql/Internal/CommonExpression.cs b/FreeSql/Internal/CommonExpression.cs
index 11096ba2..5a1c7072 100644
--- a/FreeSql/Internal/CommonExpression.cs
+++ b/FreeSql/Internal/CommonExpression.cs
@@ -2269,6 +2269,10 @@ namespace FreeSql.Internal
else
return Expression.Lambda(exp).Compile().DynamicInvoke();
break;
+ case ExpressionType.Call:
+ if (exp.IsParameter() == false)
+ return Expression.Lambda(exp).Compile().DynamicInvoke();
+ break;
}
while (expStack.Any())
{