Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ namespace Common;

public class PaginationService<T> : IPaginationService<T>
{
private const int pageSize = 20;
private const int pageSize = 10;

public PaginationResult<T> GetPaginatedResult(
IQueryable<T> source,
Expand All @@ -19,7 +19,7 @@ public PaginationResult<T> GetPaginatedResult(
var idList = source.Select(idSelector).OrderBy(id => id).ToList();

// Get the index of the lastId
int lastIdIndex = lastId.HasValue? idList.IndexOf(lastId.Value) : -1;
int lastIdIndex = lastId.HasValue ? idList.IndexOf(lastId.Value) : -1;
int currentPage = lastIdIndex >= 0 ? (lastIdIndex / pageSize) + 2 : 1;
var totalItems = source.Count();
var totalPages = (int)Math.Ceiling((double)totalItems / pageSize);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ public async Task<bool> UpdateExceptionServiceNowId(int exceptionId, string serv
ParticipantPostCode = participantDemographic?.PostCode,
TelephoneNumberHome = participantDemographic?.TelephoneNumberHome,
EmailAddressHome = participantDemographic?.EmailAddressHome,
PrimaryCareProvider = participantDemographic?.PrimaryCareProvider
PrimaryCareProvider = participantDemographic?.PrimaryCareProvider,
SupersededByNhsNumber = participantDemographic?.SupersededByNhsNumber,
};

if (participantDemographic == null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ public class ExceptionDetails
public string? EmailAddressHome { get; set; }
public string? PrimaryCareProvider { get; set; }
public Gender? Gender { get; set; }
public long? SupersededByNhsNumber { get; set; }
}
Loading