Add Saveable UpdateWhereColumns

This commit is contained in:
sunkaixuan 2019-04-10 07:47:16 +08:00
parent 70bfac9a2a
commit 567b267295
2 changed files with 11 additions and 0 deletions

View File

@ -173,6 +173,15 @@ namespace SqlSugar
return this;
}
public ISaveable<T> UpdateWhereColumns(Expression<Func<T, object>> columns)
{
LoadUpdateable();
if (this.updateable != null)
{
this.updateable.WhereColumns(columns);
}
return this;
}
protected virtual List<string> GetPrimaryKeys()
{
if (this.Context.IsSystemTablesConfig)
@ -197,5 +206,6 @@ namespace SqlSugar
updateable = this.Context.Updateable<T>(temp);
}
}
}

View File

@ -15,6 +15,7 @@ namespace SqlSugar
ISaveable<T> InsertIgnoreColumns(Expression<Func<T, object>> columns);
ISaveable<T> UpdateColumns(Expression<Func<T, object>> columns);
ISaveable<T> UpdateIgnoreColumns(Expression<Func<T, object>> columns);
ISaveable<T> UpdateWhereColumns(Expression<Func<T, object>> columns);
ISaveable<T> EnableDiffLogEvent(object businessData = null);
}
}