Skip to content

Commit 8d89b65

Browse files
authored
Update README.md
1 parent 6ab3b82 commit 8d89b65

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

README.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ Learn about why the standard offset based pagination (`Take().Skip()`) is bad in
1414

1515
Check the [benchmarks](#benchmarks) section below for a quick look at the different performance characteristics between offset and keyset.
1616

17-
**Note:** If you're using ASP.NET Core, you can use [MR.AspNetCore.Pagination](https://github.com/mrahhal/MR.AspNetCore.Pagination) which wraps this package and offers an easier to consume keyset pagination behavior with additional features for ASP.NET Core. This is a lower level library that implements keyset pagination for EF Core.
17+
> **Note**
18+
> If you're using ASP.NET Core, you can use [MR.AspNetCore.Pagination](https://github.com/mrahhal/MR.AspNetCore.Pagination) which wraps this package and offers an easier to consume keyset pagination behavior with additional features for ASP.NET Core. This is a lower level library that implements keyset pagination for EF Core.
1819
1920
## Usage
2021

@@ -43,7 +44,8 @@ Here's a small visual representation:
4344

4445
The columns and their configured order are used to order the data, and then the direction decides if we're getting the data before or after the reference row.
4546

46-
**Note:** You'll want to reverse the result whenever you use `KeysetPaginationDirection.Backward` to get the proper order of the data, since walking `Backward` gives results in the opposite order to the configured columns order. There's a helper method on `KeysetContext` for this, shown in a snippet later.
47+
> **Warning**
48+
> You'll want to reverse the result whenever you use `KeysetPaginationDirection.Backward` to get the proper order of the data, since walking `Backward` gives results in the opposite order to the configured columns order. There's a helper method on `KeysetContext` for this, shown in a snippet later.
4749
4850
`KeysetPaginate` returns a context object which you can use to get secondary info and get the data result.
4951

@@ -73,7 +75,8 @@ KeysetPaginate(
7375
)
7476
```
7577

76-
**Note:** Make sure to read the "Deterministic keysets" and "Indexing" sections for important notes about configuring keysets.
78+
> **Important**
79+
> Make sure to read the "Deterministic keysets" and "Indexing" sections for important notes about configuring keysets.
7780
7881
## Common patterns
7982

@@ -204,7 +207,8 @@ var hasNext = await keysetContext.HasNextAsync(users);
204207

205208
`HasPreviousAsync`/`HasNextAsync` are useful when you want to know when to render Previous/Next (Older/Newer) buttons.
206209

207-
**Note**: The reference/data these methods accept are loosely typed to allow flexibility when projecting your models (to DTOs for example). For more info check [this document](./docs/loose-typing.md).
210+
> **Note**
211+
> The reference/data these methods accept are loosely typed to allow flexibility when projecting your models (to DTOs for example). For more info check [this document](./docs/loose-typing.md).
208212
209213
Here's another example showing how to obtain the total count for the data to display somewhere:
210214

@@ -312,7 +316,8 @@ KeysetPaginate(
312316

313317
In this case you'll want to create a composite index on `Score` + `Id`, but make sure they're compatible with the order above. i.e You should make the index descending on `Score` and ascending on `Id` (or the opposite) for it to be effective.
314318

315-
**Note**: Refer to [this document](https://docs.microsoft.com/en-us/ef/core/modeling/indexes) on how to create indexes with EF Core. Note that support for specifying sort order in a composite index was introduced in EF Core 7.0.
319+
> **Note**
320+
> Refer to [this document](https://docs.microsoft.com/en-us/ef/core/modeling/indexes) on how to create indexes with EF Core. Note that support for specifying sort order in a composite index was introduced in EF Core 7.0.
316321
317322
## Benchmarks
318323

0 commit comments

Comments
 (0)