This commit is contained in:
sunkaixuan
2018-04-23 11:14:23 +08:00
parent 0f8f029b22
commit 36a6de58e1
2 changed files with 11 additions and 0 deletions

View File

@@ -10,6 +10,9 @@ namespace SqlSugar
{
public int PageIndex { get; set; }
public int PageSize { get; set; }
/// <summary>
/// output
/// </summary>
public int PageCount { get; set; }
}
}

View File

@@ -74,6 +74,10 @@ namespace SqlSugar
{
return this.Context.Updateable(updateObj).ExecuteCommand() > 0;
}
public bool UpdateRange<T>(T[] updateObjs) where T : class, new()
{
return this.Context.Updateable(updateObjs).ExecuteCommand() > 0;
}
public bool Update<T>(Expression<Func<T, T>> columns, Expression<Func<T, bool>> whereExpression) where T : class, new()
{
return this.Context.Updateable<T>().UpdateColumns(columns).Where(whereExpression).ExecuteCommand() > 0;
@@ -169,6 +173,10 @@ namespace SqlSugar
{
return this.Context.Updateable(updateObj).ExecuteCommand() > 0;
}
public bool UpdateRange(T [] updateObjs)
{
return this.Context.Updateable(updateObjs).ExecuteCommand() > 0;
}
public bool Update(Expression<Func<T, T>> columns, Expression<Func<T, bool>> whereExpression)
{
return this.Context.Updateable<T>().UpdateColumns(columns).Where(whereExpression).ExecuteCommand() > 0;