|
|
@ -1,4 +1,5 @@ |
|
|
|
using System; |
|
|
|
using System.Collections; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Data; |
|
|
|
using System.Dynamic; |
|
|
@ -460,7 +461,8 @@ namespace SqlSugar |
|
|
|
{ |
|
|
|
builder.AppendFormat(" ( "); |
|
|
|
|
|
|
|
}else if (isFirst) |
|
|
|
} |
|
|
|
else if (isFirst) |
|
|
|
{ |
|
|
|
builder.AppendFormat(" {0} ( ", con.Key.ToString().ToUpper()); |
|
|
|
} |
|
|
@ -497,5 +499,21 @@ namespace SqlSugar |
|
|
|
return item.FieldValue; |
|
|
|
} |
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region
|
|
|
|
public void PageEach<T>(IEnumerable<T> pageItems,int pageSize, Action<List<T>> action) |
|
|
|
{ |
|
|
|
if (pageItems != null&& pageItems.Any()) |
|
|
|
{ |
|
|
|
int totalRecord = pageItems.Count(); |
|
|
|
int pageCount = (totalRecord + pageSize - 1) / pageSize; |
|
|
|
for (int i = 1; i <= pageCount; i++) |
|
|
|
{ |
|
|
|
var list = pageItems.Skip((i - 1) * pageSize).Take(pageSize).ToList(); |
|
|
|
action(list); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
#endregion
|
|
|
|
} |
|
|
|
} |
|
|
|