using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MyCode.Project.Infrastructure.Common
{
public class PagedSearch
{
///
/// 每页显示行数
///
public int PageSize { get; set; }
///
/// 页索引,即从第几页,从1开始
///
public int Page { get; set; }
///
/// 初始化一个类型的实例
///
public PagedSearch() : this(15, 1)
{
}
///
/// 初始化一个类型的实例
///
/// 每页显示行数
/// 页索引
public PagedSearch(int pageSize, int page)
{
this.PageSize = pageSize;
this.Page = page;
}
}
///
/// 分页查询类,带分页信息
///
/// 查询条件
public class PagedSearch : PagedSearch where TEntity : new()
{
///
/// 查询条件
///
public TEntity Condition { get; set; }
///
/// 初始化一个类型的实例
///
public PagedSearch() : this(15, 1, new TEntity())
{
}
///
/// 初始化一个类型的实例
///
/// 每页显示行数
/// 页索引
/// 查询条件
public PagedSearch(int pageSize, int page, TEntity condition) : base(pageSize, page)
{
this.Condition = condition;
}
}
}