@@ -866,7 +866,7 @@ public async Task can_filter_with_child_props()
866866 var queryablePeople = testingServiceScope . DbContext ( ) . People ;
867867 var config = new QueryKitConfiguration ( config =>
868868 {
869- config . Property < TestingPerson > ( x => x . Email . Value ) . HasQueryName ( "email" ) ;
869+ config . Property < TestingPerson > ( x => x . Email ! . Value ! ) . HasQueryName ( "email" ) ;
870870 } ) ;
871871 var appliedQueryable = queryablePeople . ApplyQueryKitFilter ( input , config ) ;
872872 var people = await appliedQueryable . ToListAsync ( ) ;
@@ -1171,7 +1171,7 @@ public async Task can_handle_case_insensitive_in_for_string()
11711171 var fakePersonTwo = new FakeTestingPersonBuilder ( ) . Build ( ) ;
11721172 await testingServiceScope . InsertAsync ( fakePersonOne , fakePersonTwo ) ;
11731173
1174- var input = $ """ Title ^^* ["{ fakePersonOne . Title . ToUpper ( ) } "]""" ;
1174+ var input = $ """ Title ^^* ["{ fakePersonOne . Title ! . ToUpper ( ) } "]""" ;
11751175
11761176 // Act
11771177 var queryablePeople = testingServiceScope . DbContext ( ) . People ;
@@ -1192,7 +1192,7 @@ public async Task can_handle_case_sensitive_in_for_string()
11921192 var fakePersonOne = new FakeTestingPersonBuilder ( ) . Build ( ) ;
11931193 await testingServiceScope . InsertAsync ( fakePersonOne ) ;
11941194
1195- var input = $ """ Title ^^ ["{ fakePersonOne . Title . ToUpper ( ) } "]""" ;
1195+ var input = $ """ Title ^^ ["{ fakePersonOne . Title ! . ToUpper ( ) } "]""" ;
11961196
11971197 // Act
11981198 var queryablePeople = testingServiceScope . DbContext ( ) . People ;
@@ -1238,7 +1238,7 @@ public async Task can_handle_case_insensitive_not_in_for_string()
12381238 var fakePersonTwo = new FakeTestingPersonBuilder ( ) . Build ( ) ;
12391239 await testingServiceScope . InsertAsync ( fakePersonOne , fakePersonTwo ) ;
12401240
1241- var input = $ """ Title !^^* ["{ fakePersonOne . Title . ToUpper ( ) } "]""" ;
1241+ var input = $ """ Title !^^* ["{ fakePersonOne . Title ! . ToUpper ( ) } "]""" ;
12421242
12431243 // Act
12441244 var queryablePeople = testingServiceScope . DbContext ( ) . People ;
@@ -1310,9 +1310,9 @@ public async Task can_filter_on_child_entity()
13101310 private class RecipeDto
13111311 {
13121312 public Guid Id { get ; set ; }
1313- public string Title { get ; set ; }
1314- public string AuthorName { get ; set ; }
1315- public string AuthorInfo { get ; set ; }
1313+ public string Title { get ; set ; } = null ! ;
1314+ public string AuthorName { get ; set ; } = null ! ;
1315+ public string AuthorInfo { get ; set ; } = null ! ;
13161316 }
13171317 [ Fact ]
13181318 public async Task can_filter_on_projection ( )
@@ -1486,7 +1486,7 @@ public async Task can_filter_with_child_props_for_complex_property()
14861486 var queryableRecipes = testingServiceScope . DbContext ( ) . Recipes ;
14871487 var config = new QueryKitConfiguration ( config =>
14881488 {
1489- config . Property < Recipe > ( x => x . CollectionEmail . Value ) ;
1489+ config . Property < Recipe > ( x => x . CollectionEmail ! . Value ! ) ;
14901490 } ) ;
14911491 var appliedQueryable = queryableRecipes . ApplyQueryKitFilter ( input , config ) ;
14921492 var people = await appliedQueryable . ToListAsync ( ) ;
@@ -1515,7 +1515,7 @@ public async Task can_filter_with_child_props_for_aliased_complex_property()
15151515 var queryableRecipes = testingServiceScope . DbContext ( ) . Recipes ;
15161516 var config = new QueryKitConfiguration ( config =>
15171517 {
1518- config . Property < Recipe > ( x => x . CollectionEmail . Value ) . HasQueryName ( "email" ) ;
1518+ config . Property < Recipe > ( x => x . CollectionEmail ! . Value ! ) . HasQueryName ( "email" ) ;
15191519 } ) ;
15201520 var appliedQueryable = queryableRecipes . ApplyQueryKitFilter ( input , config ) ;
15211521 var people = await appliedQueryable . ToListAsync ( ) ;
@@ -1544,7 +1544,7 @@ public async Task can_filter_with_child_props_for_null_aliased_complex_property(
15441544 var queryableRecipes = testingServiceScope . DbContext ( ) . Recipes ;
15451545 var config = new QueryKitConfiguration ( config =>
15461546 {
1547- config . Property < Recipe > ( x => x . CollectionEmail . Value ) . HasQueryName ( "email" ) ;
1547+ config . Property < Recipe > ( x => x . CollectionEmail ! . Value ! ) . HasQueryName ( "email" ) ;
15481548 } ) ;
15491549 var appliedQueryable = queryableRecipes . ApplyQueryKitFilter ( input , config ) ;
15501550 var people = await appliedQueryable . ToListAsync ( ) ;
@@ -1573,7 +1573,7 @@ public async Task can_filter_with_child_props_for_complex_property_with_alias()
15731573 var queryableRecipes = testingServiceScope . DbContext ( ) . Recipes ;
15741574 var config = new QueryKitConfiguration ( config =>
15751575 {
1576- config . Property < Recipe > ( x => x . CollectionEmail . Value ) . HasQueryName ( "email" ) ;
1576+ config . Property < Recipe > ( x => x . CollectionEmail ! . Value ! ) . HasQueryName ( "email" ) ;
15771577 } ) ;
15781578 var appliedQueryable = queryableRecipes . ApplyQueryKitFilter ( input , config ) ;
15791579 var people = await appliedQueryable . ToListAsync ( ) ;
@@ -2598,10 +2598,10 @@ public async Task can_filter_with_custom_operation_complex_business_logic()
25982598
25992599 var config = new QueryKitConfiguration ( config =>
26002600 {
2601- config . CustomOperation < TestingPerson > ( ( x , op , value ) =>
2602- ( bool ) value ?
2603- ( x . Age > 30 && x . Rating > 7 && x . FirstName . Contains ( "VIP" ) ) :
2604- ! ( x . Age > 30 && x . Rating > 7 && x . FirstName . Contains ( "VIP" ) ) )
2601+ config . CustomOperation < TestingPerson > ( ( x , op , value ) =>
2602+ ( bool ) value ?
2603+ ( x . Age > 30 && x . Rating > 7 && x . FirstName ! . Contains ( "VIP" ) ) :
2604+ ! ( x . Age > 30 && x . Rating > 7 && x . FirstName ! . Contains ( "VIP" ) ) )
26052605 . HasQueryName ( "isVipCustomer" ) ;
26062606 } ) ;
26072607
@@ -3651,11 +3651,13 @@ public async Task can_filter_with_derived_property_using_not_equal_on_child_navi
36513651 var input = $ """ authorInfo == "John_{ uniqueId } " && Title == "RecipeWithAuthor_{ uniqueId } " """ ;
36523652 var config = new QueryKitConfiguration ( config =>
36533653 {
3654- config . DerivedProperty < Recipe > ( x =>
3655- x . Author != null
3656- ? x . Author . Name
3654+ #pragma warning disable CS8603 // Possible null reference return - intentional for this test
3655+ config . DerivedProperty < Recipe > ( x =>
3656+ x . Author != null
3657+ ? x . Author . Name
36573658 : null )
36583659 . HasQueryName ( "authorInfo" ) ;
3660+ #pragma warning restore CS8603
36593661 } ) ;
36603662
36613663 // Act
@@ -3824,12 +3826,14 @@ public async Task can_filter_with_derived_property_containing_complex_conditiona
38243826 // Create config with conditional derived property
38253827 var config = new QueryKitConfiguration ( config =>
38263828 {
3829+ #pragma warning disable CS8603 // Possible null reference return - intentional for this test
38273830 config . DerivedProperty < TestingPerson > ( x =>
38283831 x . Date . HasValue
38293832 ? ( x . Date . Value . ToDateTime ( TimeOnly . MinValue ) -
38303833 DateOnly . FromDateTime ( DateTime . UtcNow ) . ToDateTime ( TimeOnly . MinValue ) ) . Days
38313834 : ( int ? ) null
38323835 ) . HasQueryName ( "daysFromNow" ) ;
3836+ #pragma warning restore CS8603
38333837 } ) ;
38343838
38353839 // Act & Assert - Should not throw "Unsupported value '0' for type 'Object'"
0 commit comments