BotSharp/src/Infrastructure/BotSharp.Abstraction/Utilities/Pagination.cs
2024-01-17 23:23:20 -06:00

18 lines
375 B
C#

namespace BotSharp.Abstraction.Utilities;
public class Pagination
{
public int Page { get; set; } = 1;
/// <summary>
/// Use -1 for all records
/// </summary>
public int Size { get; set; } = 20;
public int Offset => (Page - 1) * Size;
}
public class PagedItems<T>
{
public int Count { get; set; }
public IEnumerable<T> Items { get; set; }
}