:zap:新增数据库差异化日志记录
This commit is contained in:
@@ -72,9 +72,10 @@ namespace ZR.Repository
|
||||
/// <param name="entity"></param>
|
||||
/// <param name="ignoreNullColumns"></param>
|
||||
/// <returns></returns>
|
||||
public int Update(T entity, bool ignoreNullColumns = false)
|
||||
public int Update(T entity, bool ignoreNullColumns = false, object data = null)
|
||||
{
|
||||
return Context.Updateable(entity).IgnoreColumns(ignoreNullColumns).ExecuteCommand();
|
||||
return Context.Updateable(entity).IgnoreColumns(ignoreNullColumns)
|
||||
.EnableDiffLogEventIF(data.IsNotEmpty(), data).ExecuteCommand();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace ZR.Repository
|
||||
#endregion add
|
||||
|
||||
#region update
|
||||
int Update(T entity, bool ignoreNullColumns = false);
|
||||
int Update(T entity, bool ignoreNullColumns = false, object data = null);
|
||||
|
||||
/// <summary>
|
||||
/// 只更新表达式的值
|
||||
|
||||
Reference in New Issue
Block a user