This commit is contained in:
sunkaixuan
2017-05-19 15:40:08 +08:00
parent 3f930d0107
commit 28e160a49c
2 changed files with 7 additions and 1 deletions

View File

@@ -47,11 +47,15 @@ namespace OrmTest.UnitTest
.UpdateColumns(it => new { it.Name }).ToSql();
//update List<T>
var s8 = db.Updateable(updateObj).With(SqlWith.UpdLock).ToSql();
var s8 = db.Updateable(updateObjs).With(SqlWith.UpdLock).ToSql();
//Re Set Value
var s9 = db.Updateable(updateObj)
.ReSetValue(it=>it.Name==(it.SchoolId+"")).ToSql();
//Where By Expression
var s10 = db.Updateable(updateObj)
.Where(it => it.Id==1).ToSql();
}
public SqlSugarClient GetInstance()

View File

@@ -13,11 +13,13 @@ namespace SqlSugar
IUpdateable<T> With(string lockString);
IUpdateable<T> Update(T InsertObj);
IUpdateable<T> Where(bool isUpdateNull);
IUpdateable<T> Where(Expression<Func<T, bool>> expression);
IUpdateable<T> UpdateColumns(Expression<Func<T, object>> columns);
IUpdateable<T> IgnoreColumns(Expression<Func<T, object>> columns);
IUpdateable<T> IgnoreColumns(Func<string, bool> ignoreColumMethod);
IUpdateable<T> ReSetValue(Expression<Func<T, bool>> setValueExpression);
IUpdateable<T> UpdateRange(List<T> InsertObjs);
KeyValuePair<string,List<SugarParameter>> ToSql();
object Where(Func<object, bool> p);
}
}