You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
			
				
					20 lines
				
				500 B
			
		
		
			
		
	
	
					20 lines
				
				500 B
			| 
											4 years ago
										 | 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; | ||
|  |         } | ||
|  |     } | ||
|  | } |