Files
deepdrft/DeepDrftWeb.Client/ViewModels/TracksViewModel.cs
T
Daniel Harvey cd700dc758 feat(data): rename *.Services projects, lift TrackEntity onto BlazorBlocks data layer, regenerate initial Postgres migration
DeepDrftWeb.Services → DeepDrftData; DeepDrftContent.Services → DeepDrftContent.Data.
TrackEntity:BaseEntity, TrackRepository:Repository<>, TrackManager:Manager<>+ITrackService.
Drops DeepDrftModels PagingParameters/PagedResult in favour of Models.Common.* from BlazorBlocks.
InitialCreate migration captures full schema including is_deleted index.
2026-05-18 22:22:09 -04:00

34 lines
831 B
C#

using DeepDrftModels.Entities;
using DeepDrftWeb.Client.Clients;
using Models.Common;
namespace DeepDrftWeb.Client.ViewModels;
public class TracksViewModel
{
public TrackClient TrackClient { get; }
// private int _pageNumber = 1;
public int PageNumber { get; set; } = 1;
public int PageSize
{
get => Page?.PageSize ?? 15;
set
{
if (Page == null) throw new Exception();
if (value != Page.PageSize)
{
Page.PageSize = value;
}
}
}
public string SortBy { get; set; } = string.Empty;
public bool IsDescending { get; set; } = false;
public PagedResult<TrackEntity>? Page { get; set; } = null;
public TracksViewModel(TrackClient trackClient)
{
TrackClient = trackClient;
}
}