Fixes and a lot of changes

This commit is contained in:
2026-05-14 22:13:22 +02:00
parent 80f44422a0
commit f62cf057d2
62 changed files with 113 additions and 182 deletions
@@ -0,0 +1,26 @@
using X.PagedList;
namespace Musify.Application.Pagination
{
public record PaginatedResponse<T>(
IReadOnlyCollection<T> Items,
int PageNumber,
int PageSize,
int PageCount,
int TotalItemCount,
bool HasNextPage,
bool HasPreviousPage)
{
public static PaginatedResponse<T> FromPagedList(IPagedList<T> pagedList)
{
return new PaginatedResponse<T>(
pagedList.ToArray(),
pagedList.PageNumber,
pagedList.PageSize,
pagedList.PageCount,
pagedList.TotalItemCount,
pagedList.HasNextPage,
pagedList.HasPreviousPage);
}
}
}