This repository has been archived by the owner on Oct 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from DFE-Digital/feature/academies-api-contracts
Feature/academies api contracts
- Loading branch information
Showing
4 changed files
with
27 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
26 changes: 26 additions & 0 deletions
26
academiesContracts/Dfe.Academies.Contracts/V4/PagedDataResponse.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
namespace Dfe.Academies.Contracts.V4; | ||
using System.Collections.Generic; | ||
|
||
public class PagedDataResponse<TResponse> where TResponse : class | ||
{ | ||
|
||
public IEnumerable<TResponse> Data { get; set; } | ||
public PagingResponse Paging { get; set; } | ||
|
||
public PagedDataResponse() => Data = new List<TResponse>(); | ||
|
||
public PagedDataResponse(IEnumerable<TResponse> data, PagingResponse pagingResponse) | ||
{ | ||
Data = data; | ||
Paging = pagingResponse; | ||
} | ||
|
||
public PagedDataResponse(TResponse data) => Data = new List<TResponse> { data }; | ||
|
||
} | ||
public class PagingResponse | ||
{ | ||
public int Page { get; set; } | ||
public int RecordCount { get; set; } | ||
public string NextPageUrl { get; set; } | ||
} |
File renamed without changes.