File tree Expand file tree Collapse file tree
DevExtreme.AspNet.Data.Tests Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -74,18 +74,23 @@ public void MultiKey() {
7474 }
7575
7676 [ Fact ]
77- public void NotUsedWoSkip ( ) {
77+ public void ActiveForFirstPage ( ) {
78+ var data = new [ ] {
79+ new { ID = 123 }
80+ } ;
81+
7882 var loadOptions = new SampleLoadOptions {
83+ SuppressGuardNulls = true ,
84+ PrimaryKey = new [ ] { "ID" } ,
7985 PaginateViaPrimaryKey = true ,
86+
87+ Skip = 0 ,
8088 Take = 123
8189 } ;
8290
83- DataSourceLoader . Load ( new object [ 0 ] , loadOptions ) ;
91+ DataSourceLoader . Load ( data , loadOptions ) ;
8492
85- Assert . All (
86- loadOptions . ExpressionLog ,
87- i => Assert . DoesNotContain ( ".Select(" , i )
88- ) ;
93+ Assert . Contains ( ".Select(obj => new AnonType`1" , loadOptions . ExpressionLog [ 0 ] ) ;
8994 }
9095
9196 [ Fact ]
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ public LoadResult Load() {
6666
6767 Expression loadExpr ;
6868
69- if ( ! deferPaging && Context . PaginateViaPrimaryKey && Context . Skip > 0 ) {
69+ if ( ! deferPaging && Context . PaginateViaPrimaryKey ) {
7070 if ( ! Context . HasPrimaryKey ) {
7171 throw new InvalidOperationException ( nameof ( DataSourceLoadOptionsBase . PaginateViaPrimaryKey )
7272 + " requires a primary key."
You can’t perform that action at this time.
0 commit comments