From f6847b940e613b8c3089df1d448eb55d339c062b Mon Sep 17 00:00:00 2001 From: GengLei Date: Tue, 7 Jan 2025 13:44:13 +0800 Subject: [PATCH] =?UTF-8?q?Upsert=E6=97=B6columns=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=8F=82=E6=95=B0null?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- XCode/Entity/EntityExtension.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/XCode/Entity/EntityExtension.cs b/XCode/Entity/EntityExtension.cs index 995ce8d67..99f12c0d5 100644 --- a/XCode/Entity/EntityExtension.cs +++ b/XCode/Entity/EntityExtension.cs @@ -810,7 +810,7 @@ public static Int32 BatchUpdate(this IEnumerable list, BatchOption? option /// 简单来说:对于一行记录,如果Insert 成功则返回1,如果需要执行的是update 则返回2 /// Oracle返回值:无论是插入还是更新返回的都始终为-1 /// - public static Int32 Upsert(this IEnumerable list, IDataColumn[]? columns, ICollection? updateColumns = null, ICollection? addColumns = null, IEntitySession? session = null) where T : IEntity + public static Int32 Upsert(this IEnumerable list, IDataColumn[]? columns = null, ICollection? updateColumns = null, ICollection? addColumns = null, IEntitySession? session = null) where T : IEntity { var option = new BatchOption(columns, updateColumns, addColumns); return BatchUpsert(list, option, session); @@ -951,7 +951,7 @@ public static Int32 BatchUpsert(this IEnumerable list, BatchOption? option /// do update success =2次(insert 1次+update 1次), /// 简单来说:如果Insert 成功则返回1,如果需要执行的是update 则返回2, /// - public static Int32 Upsert(this IEntity entity, IDataColumn[]? columns, ICollection? updateColumns = null, ICollection? addColumns = null, IEntitySession? session = null) + public static Int32 Upsert(this IEntity entity, IDataColumn[]? columns = null, ICollection? updateColumns = null, ICollection? addColumns = null, IEntitySession? session = null) { var option = new BatchOption(columns, updateColumns, addColumns); return Upsert(entity, option, session);