mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 04:18:16 +08:00
- 增加 IUpdate.SetSource 批量更新时指定主键;#337
This commit is contained in:
@ -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<T>().SetSourceAndIgnore(item, colval => colval == null)<para></para>
|
||||
|
Reference in New Issue
Block a user