14 changed files with 43 additions and 25 deletions
@ -0,0 +1,20 @@ |
|||
using System; |
|||
using PetaPoco; |
|||
using System.Collections.Generic; |
|||
|
|||
namespace Pingchuan.BeijingSafeguard.Model |
|||
{ |
|||
public class Pagination<T> |
|||
{ |
|||
public long total { get; set; } |
|||
public List<T> rows { get; set; } |
|||
|
|||
public static Pagination<T> FromPage(Page<T> page) |
|||
{ |
|||
Pagination<T> pagination = new Pagination<T>(); |
|||
pagination.total = page.TotalItems; |
|||
pagination.rows = page.Items; |
|||
return pagination; |
|||
} |
|||
} |
|||
} |
Loading…
Reference in new issue