File tree Expand file tree Collapse file tree 2 files changed +24
-6
lines changed
test/EFCore.MySql.FunctionalTests/Query Expand file tree Collapse file tree 2 files changed +24
-6
lines changed Original file line number Diff line number Diff line change @@ -34,10 +34,10 @@ public override async Task Multiple_different_entity_type_from_different_namespa
3434 var bad = context . Set < TestQuery > ( ) . FromSqlRaw ( @"SELECT cast(null as signed) AS MyValue" ) . ToList ( ) ; // Exception
3535 }
3636
37- protected override Task SetParameterizedCollectionMode ( DbContextOptionsBuilder optionsBuilder , ParameterTranslationMode mode )
37+ protected override DbContextOptionsBuilder SetParameterizedCollectionMode ( DbContextOptionsBuilder optionsBuilder , ParameterTranslationMode mode )
3838 {
3939 // MySQL-specific parameter handling configuration
4040 // For now, use default MySQL behavior as the implementation is provider-specific
41- return Task . CompletedTask ;
41+ return optionsBuilder ;
4242 }
4343}
Original file line number Diff line number Diff line change @@ -479,9 +479,18 @@ public override async Task Column_collection_inside_json_owned_entity()
479479
480480 #endregion Type mapping inference
481481
482- public override async Task Parameter_collection_Count_with_column_predicate_with_default_constants ( )
482+ [ ConditionalTheory ]
483+ [ MemberData ( nameof ( IsAsyncData ) ) ]
484+ public virtual async Task Parameter_collection_Count_with_column_predicate_with_default_constants ( bool async )
483485 {
484- await base . Parameter_collection_Count_with_column_predicate_with_default_constants ( ) ;
486+ var contextFactory = await InitializeAsync < Context30572 > ( seed : c => c . Seed ( ) ) ;
487+
488+ await using var context = contextFactory . CreateContext ( ) ;
489+
490+ await AssertQuery (
491+ async ,
492+ ss => ss. Set < Context30572 . TestEntity > ( )
493+ . Where ( t => new [ ] { 2 , 999 } . Count ( i => i > t . Id ) == 1 ) ) ;
485494
486495 AssertSql (
487496$ """
@@ -494,9 +503,18 @@ SELECT COUNT(*)
494503""" ) ;
495504 }
496505
497- public override async Task Parameter_collection_of_ints_Contains_int_with_default_constants ( )
506+ [ ConditionalTheory ]
507+ [ MemberData ( nameof ( IsAsyncData ) ) ]
508+ public virtual async Task Parameter_collection_of_ints_Contains_int_with_default_constants ( bool async )
498509 {
499- await base . Parameter_collection_of_ints_Contains_int_with_default_constants ( ) ;
510+ var contextFactory = await InitializeAsync < Context30572 > ( seed : c => c . Seed ( ) ) ;
511+
512+ await using var context = contextFactory . CreateContext ( ) ;
513+
514+ await AssertQuery (
515+ async ,
516+ ss => ss. Set < Context30572 . TestEntity > ( )
517+ . Where ( t => new [ ] { 2 , 999 } . Contains ( t . Id ) ) ) ;
500518
501519 AssertSql (
502520"""
You can’t perform that action at this time.
0 commit comments