From 36a6de58e106036283802d48d876ea2f1e003ce6 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Mon, 23 Apr 2018 11:14:23 +0800 Subject: [PATCH] - --- Src/Asp.Net/SqlSugar/Entities/PageModel.cs | 3 +++ Src/Asp.Net/SqlSugar/SimpleClient.cs | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/Src/Asp.Net/SqlSugar/Entities/PageModel.cs b/Src/Asp.Net/SqlSugar/Entities/PageModel.cs index 6beb46fbd..4d510dcb5 100644 --- a/Src/Asp.Net/SqlSugar/Entities/PageModel.cs +++ b/Src/Asp.Net/SqlSugar/Entities/PageModel.cs @@ -10,6 +10,9 @@ namespace SqlSugar { public int PageIndex { get; set; } public int PageSize { get; set; } + /// + /// output + /// public int PageCount { get; set; } } } diff --git a/Src/Asp.Net/SqlSugar/SimpleClient.cs b/Src/Asp.Net/SqlSugar/SimpleClient.cs index 381f11bac..b75161e48 100644 --- a/Src/Asp.Net/SqlSugar/SimpleClient.cs +++ b/Src/Asp.Net/SqlSugar/SimpleClient.cs @@ -74,6 +74,10 @@ namespace SqlSugar { return this.Context.Updateable(updateObj).ExecuteCommand() > 0; } + public bool UpdateRange(T[] updateObjs) where T : class, new() + { + return this.Context.Updateable(updateObjs).ExecuteCommand() > 0; + } public bool Update(Expression> columns, Expression> whereExpression) where T : class, new() { return this.Context.Updateable().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> columns, Expression> whereExpression) { return this.Context.Updateable().UpdateColumns(columns).Where(whereExpression).ExecuteCommand() > 0;