- 增加 IUpdate.SetDto 根据 dto 更新的方法;#218

This commit is contained in:
28810
2020-02-28 11:54:13 +08:00
parent f22f65fee9
commit 5cff594161
4 changed files with 71 additions and 15 deletions

View File

@ -56,6 +56,7 @@ namespace FreeSql
/// <param name="source">实体集合</param>
/// <returns></returns>
IUpdate<T1> SetSource(IEnumerable<T1> source);
/// <summary>
/// 忽略的列IgnoreColumns(a => a.Name) | IgnoreColumns(a => new{a.Name,a.Time}) | IgnoreColumns(a => new[]{"name","time"})
/// </summary>
@ -107,6 +108,17 @@ namespace FreeSql
/// <returns></returns>
IUpdate<T1> SetRaw(string sql, object parms = null);
/// <summary>
/// 设置更新的列
/// <para></para>
/// SetDto(new { title = "xxx", clicks = 2 })
/// <para></para>
/// SetDto(new Dictionary&lt;string, object&gt; { ["title"] = "xxx", ["clicks"] = 2 })
/// </summary>
/// <param name="dto">dto 或 Dictionary&lt;string, object&gt;</param>
/// <returns></returns>
IUpdate<T1> SetDto(object dto);
/// <summary>
/// lambda表达式条件仅支持实体基础成员不包含导航对象<para></para>
/// 若想使用导航对象,请使用 ISelect.ToUpdate() 方法