14 lines
585 B
C#
14 lines
585 B
C#
using System;
|
|
|
|
namespace VideoGameQuotes.Web.Models {
|
|
public class PagedQuoteCollectionModel : QuoteCollectionModel {
|
|
public int Start { get; set; }
|
|
public int End { get; set; }
|
|
public int PageSize { get { return End - Start + 1; } }
|
|
public int NextStart { get { return End + 1; } }
|
|
public int NextEnd { get { return End + PageSize; } }
|
|
public int PreviousStart { get { return Math.Max(0, Start - PageSize); } }
|
|
public int PreviousEnd { get { return Math.Max(PageSize - 1, End - PageSize); } }
|
|
public bool HasPrevious { get { return Start > 0; } }
|
|
}
|
|
} |