File tree Expand file tree Collapse file tree 4 files changed +17
-1
lines changed Expand file tree Collapse file tree 4 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
99
1010## Unreleased
1111
12- _ Nothing yet _
12+ - Support booleans. [[ # 16 ] ( https://github.com/mrahhal/MR.EntityFrameworkCore.KeysetPagination/issues/16 )]
1313
1414## 1.0.1 - 2022-02-18
1515
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ public static class KeysetPaginationExtensions
1010 {
1111 { typeof ( string ) , GetCompareToMethod ( typeof ( string ) ) } ,
1212 { typeof ( Guid ) , GetCompareToMethod ( typeof ( Guid ) ) } ,
13+ { typeof ( bool ) , GetCompareToMethod ( typeof ( bool ) ) } ,
1314 } ;
1415 private static readonly ConstantExpression ConstantExpression0 = Expression . Constant ( 0 ) ;
1516
Original file line number Diff line number Diff line change @@ -26,6 +26,19 @@ public async Task KeysetPaginate_Raw()
2626 Assert . Equal ( 20 , result . Count ) ;
2727 }
2828
29+ [ Fact ]
30+ public async Task KeysetPaginate_bool ( )
31+ {
32+ var reference = DbContext . IntModels . First ( ) ;
33+
34+ var result = await DbContext . IntModels . KeysetPaginateQuery (
35+ b => b . Ascending ( x => x . IsDone ) ,
36+ KeysetPaginationDirection . Forward ,
37+ reference )
38+ . Take ( 20 )
39+ . ToListAsync ( ) ;
40+ }
41+
2942 [ Fact ]
3043 public async Task KeysetPaginate_AfterReference_int ( )
3144 {
Original file line number Diff line number Diff line change @@ -5,4 +5,6 @@ public class IntModel
55 public int Id { get ; set ; }
66
77 public DateTime Created { get ; set ; }
8+
9+ public bool IsDone { get ; set ; }
810}
You can’t perform that action at this time.
0 commit comments