Skip to content

Instantly share code, notes, and snippets.

@sunmeat
Created January 1, 2026 12:27
Show Gist options
  • Select an option

  • Save sunmeat/fa50fa94d8f1b4dec19d0421a4570b94 to your computer and use it in GitHub Desktop.

Select an option

Save sunmeat/fa50fa94d8f1b4dec19d0421a4570b94 to your computer and use it in GitHub Desktop.
вьюмодель для Sieve
namespace Soccer.Models
{
public class IndexViewModel
{
public List<Player> Players { get; set; } = new();
public int TotalCount { get; set; }
public int Page { get; set; }
public int PageSize { get; set; }
public int TotalPages => (int)Math.Ceiling(TotalCount / (double)PageSize);
public bool HasPrevious => Page > 1;
public bool HasNext => Page < TotalPages;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment