Skip to content

Commit 0078960

Browse files
committed
Aggiornato README
1 parent 9b484d4 commit 0078960

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)