Paging Model Dto
public interface IHasTotalCount
{
int TotalCount { get; set; }
}
public interface IPagedResultRequest : ILimitedResultRequest
{
//
// Summary:
// Skip count (beginning of the page).
int SkipCount { get; set; }
}
public interface ILimitedResultRequest
{
//
// Summary:
// Max expected result count.
int MaxResultCount { get; set; }
}
public class PagingModelDto<TDto> : IHasTotalCount, IPagedResultRequest
{
public PagingModelDto()
{
}
/// <summary>
/// PagingModelDto
/// </summary>
/// <param name="totalCount"></param>
/// <param name="skipCount"></param>
/// <param name="maxResultCount"></param>
public PagingModelDto(int totalCount, int skipCount, int maxResultCount)
{
TotalCount = totalCount;
SkipCount = skipCount;
MaxResultCount = maxResultCount;
}
public ListResultDto<TDto> Items { get; set; }
public int TotalCount { get; set; }
public int SkipCount { get; set; }
public int MaxResultCount { get; set; }
}
Last updated