2using System.Diagnostics.CodeAnalysis;
5using Microsoft.AspNetCore.Mvc;
18 [MemberNotNullWhen(
true, nameof(
Results))]
19 [MemberNotNullWhen(
false, nameof(
EarlyOut))]
25 public IOrderedQueryable<TModel>?
Results {
get; }
38 Results = results ??
throw new ArgumentNullException(nameof(results));
47 EarlyOut = earlyOut ??
throw new ArgumentNullException(nameof(earlyOut));
Helper for returning paginated models.
PaginatableResult(IActionResult earlyOut)
Initializes a new instance of the PaginatableResult<TModel> class.
bool Valid
Whether or not the PaginatableResult<TModel> is valid.
IActionResult? EarlyOut
An IActionResult to return immediately.
PaginatableResult(IOrderedQueryable< TModel > results)
Initializes a new instance of the PaginatableResult<TModel> class.
IOrderedQueryable< TModel >? Results
The IOrderedQueryable<T> TModel results.