- 增加 IUpdate.SetSource 批量更新时指定主键;#337

This commit is contained in:
2881099
2021-03-04 15:13:39 +08:00
parent afd489c0db
commit 90438e20d8
25 changed files with 142 additions and 136 deletions

View File

@ -72,8 +72,9 @@ namespace FreeSql
/// 注意:实体必须定义主键,并且最终会自动附加条件 where id in (source.Id)
/// </summary>
/// <param name="source">实体集合</param>
/// <param name="primarys">根据主键更新a => a.Name | a => new{a.Name,a.Time} | a => new[]{"name","time"}</param>
/// <returns></returns>
IUpdate<T1> SetSource(IEnumerable<T1> source);
IUpdate<T1> SetSource(IEnumerable<T1> source, Expression<Func<T1, object>> primarys = null);
/// <summary>
/// 更新数据,设置更新的实体,同时设置忽略的列<para></para>
/// 忽略 null 属性fsql.Update&lt;T&gt;().SetSourceAndIgnore(item, colval => colval == null)<para></para>