Skip to content

Commit

Permalink
Upsert时columns默认参数null
Browse files Browse the repository at this point in the history
  • Loading branch information
yrxx98 committed Jan 7, 2025
1 parent 5f75461 commit f6847b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions XCode/Entity/EntityExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,7 @@ public static Int32 BatchUpdate<T>(this IEnumerable<T> list, BatchOption? option
/// 简单来说:对于一行记录,如果Insert 成功则返回1,如果需要执行的是update 则返回2
/// Oracle返回值:无论是插入还是更新返回的都始终为-1
/// </returns>
public static Int32 Upsert<T>(this IEnumerable<T> list, IDataColumn[]? columns, ICollection<String>? updateColumns = null, ICollection<String>? addColumns = null, IEntitySession? session = null) where T : IEntity
public static Int32 Upsert<T>(this IEnumerable<T> list, IDataColumn[]? columns = null, ICollection<String>? updateColumns = null, ICollection<String>? addColumns = null, IEntitySession? session = null) where T : IEntity
{
var option = new BatchOption(columns, updateColumns, addColumns);
return BatchUpsert(list, option, session);
Expand Down Expand Up @@ -951,7 +951,7 @@ public static Int32 BatchUpsert<T>(this IEnumerable<T> list, BatchOption? option
/// do update success =2次(insert 1次+update 1次),
/// 简单来说:如果Insert 成功则返回1,如果需要执行的是update 则返回2,
/// </returns>
public static Int32 Upsert(this IEntity entity, IDataColumn[]? columns, ICollection<String>? updateColumns = null, ICollection<String>? addColumns = null, IEntitySession? session = null)
public static Int32 Upsert(this IEntity entity, IDataColumn[]? columns = null, ICollection<String>? updateColumns = null, ICollection<String>? addColumns = null, IEntitySession? session = null)
{
var option = new BatchOption(columns, updateColumns, addColumns);
return Upsert(entity, option, session);
Expand Down

0 comments on commit f6847b9

Please sign in to comment.