init commit
This commit is contained in:
38
20220330_Vote/Ewide.Core/Extension/PageDataResult.cs
Normal file
38
20220330_Vote/Ewide.Core/Extension/PageDataResult.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Ewide.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// 小诺分页列表结果
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
public static class PageDataResult<T> where T : new()
|
||||
{
|
||||
public static dynamic PageResult(PagedList<T> page)
|
||||
{
|
||||
return new
|
||||
{
|
||||
PageIndex = page.PageIndex,
|
||||
PageSize = page.PageSize,
|
||||
TotalPage = page.TotalPages,
|
||||
TotalCount = page.TotalCount,
|
||||
Items = page.Items
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public static class PageDataResult
|
||||
{
|
||||
public static dynamic PageResult(PagedList page)
|
||||
{
|
||||
return new
|
||||
{
|
||||
PageIndex = page.PageIndex,
|
||||
PageSize = page.PageSize,
|
||||
TotalPage = page.TotalPages,
|
||||
TotalCount = page.TotalCount,
|
||||
Items = page.Items
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user