using SharedModels.QueryParameters; namespace Server.Helpers; public class Pager : IPager { public PagingMetadata ApplyPaging(ref IQueryable obj, int pageNumber, int pageSize) { var metadata = new PagingMetadata(obj, pageNumber, pageSize); obj = obj .Skip((pageNumber - 1) * pageSize) .Take(pageSize); return metadata; } }