File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -112,11 +112,13 @@ public class YourEntityService : IYourEntityService
112112 }
113113
114114 // Optional method for pagination
115+ // For optional lambdas read the comments of the GetAllAsync method
116+ // A simple way to retrieve data is to call the GetAllAsync() method
117+ // After retrieving the data, it will be possible to invoke the GetPaginatedAsync() method to have a paginated list
118+ // Example: var query = await repository.GetAllAsync(); var result = await repository.GetPaginatedAsync(query, 1, 10);
115119 public async Task <PaginatedResult <TEntity >> GetPaginatedAsync (IQueryable <TEntity > query , int pageNumber , int pageSize )
116120 {
117- // For optional lambdas read the comments of the GetAllAsync method
118- var query = await repository .GetAllAsync ();
119- var result = await repository .GetPaginatedAsync (query , 2 , 5 );
121+ var result = await repository .GetPaginatedAsync (query , pageNumber , pageSize );
120122
121123 return result ;
122124 }
You can’t perform that action at this time.
0 commit comments