DD.WellWorkover.Cloud/AsbCloudApp/Data/PaginationContainer.cs

42 lines
1.1 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System.Collections.Generic;
namespace AsbCloudApp.Data
{
/// <summary>
/// Контейнер для поддержки постраничного просмотра таблиц
/// </summary>
/// <typeparam name="T"></typeparam>
public class PaginationContainer<T>
{
public PaginationContainer()
{
Items = new List<T>(4);
}
public PaginationContainer(int capacity)
{
Items = new List<T>(capacity);
}
/// <summary>
/// Кол-во записей пропущеных с начала таблицы в запросе от api
/// </summary>
public int Skip { get; set; }
/// <summary>
/// Кол-во записей в запросе от api
/// </summary>
public int Take { get; set; }
/// <summary>
/// Кол-во записей всего в таблице
/// </summary>
public int Count { get; set; }
/// <summary>
/// Данные
/// </summary>
public List<T> Items { get; set; }
}
}