@@ -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"""
@@ -506,37 +524,61 @@ public override async Task Parameter_collection_of_ints_Contains_int_with_defaul
506524""" ) ;
507525 }
508526
509- public override async Task Parameter_collection_Count_with_column_predicate_with_default_constants_EF_Parameter ( )
527+ [ ConditionalTheory ]
528+ [ MemberData ( nameof ( IsAsyncData ) ) ]
529+ public virtual async Task Parameter_collection_Count_with_column_predicate_with_default_constants_EF_Parameter ( bool async )
510530 {
511- await base . Parameter_collection_Count_with_column_predicate_with_default_constants_EF_Parameter ( ) ;
531+ await AssertQuery (
532+ async ,
533+ ss => ss. Set < TestEntity > ( ) . Where ( x => new [ ] { 2 , 999 } . Count ( i => i > x . Id ) == 1 ) ) ;
512534
513535 AssertSql ( ) ;
514536 }
515537
516- public override async Task Parameter_collection_of_ints_Contains_int_with_default_constants_EF_Parameter ( )
538+ [ ConditionalTheory ]
539+ [ MemberData ( nameof ( IsAsyncData ) ) ]
540+ public virtual async Task Parameter_collection_of_ints_Contains_int_with_default_constants_EF_Parameter ( bool async )
517541 {
518- await base . Parameter_collection_of_ints_Contains_int_with_default_constants_EF_Parameter ( ) ;
542+ await AssertQuery (
543+ async ,
544+ ss => ss. Set < TestEntity > ( ) . Where ( x => new [ ] { 2 , 999 } . Contains ( x . Id ) ) ) ;
519545
520546 AssertSql ( ) ;
521547 }
522548
523- public override async Task Parameter_collection_Count_with_column_predicate_with_default_parameters ( )
549+ [ ConditionalTheory ]
550+ [ MemberData ( nameof ( IsAsyncData ) ) ]
551+ public virtual async Task Parameter_collection_Count_with_column_predicate_with_default_parameters ( bool async )
524552 {
525- await base . Parameter_collection_Count_with_column_predicate_with_default_parameters ( ) ;
553+ var ints = new [ ] { 2 , 999 } ;
554+ await AssertQuery (
555+ async ,
556+ ss => ss. Set < TestEntity > ( ) . Where ( x => ints . Count ( i => i > x . Id ) == 1 ) ) ;
526557
527558 AssertSql ( ) ;
528559 }
529560
530- public override async Task Parameter_collection_of_ints_Contains_int_with_default_parameters ( )
561+ [ ConditionalTheory ]
562+ [ MemberData ( nameof ( IsAsyncData ) ) ]
563+ public virtual async Task Parameter_collection_of_ints_Contains_int_with_default_parameters ( bool async )
531564 {
532- await base . Parameter_collection_of_ints_Contains_int_with_default_parameters ( ) ;
565+ var ints = new [ ] { 2 , 999 } ;
566+ await AssertQuery (
567+ async ,
568+ ss => ss. Set < TestEntity > ( ) . Where ( x => ints . Contains ( x . Id ) ) ) ;
533569
534570 AssertSql ( ) ;
535571 }
536572
537- public override async Task Parameter_collection_Count_with_column_predicate_with_default_parameters_EF_Constant ( )
573+ [ ConditionalTheory ]
574+ [ MemberData ( nameof ( IsAsyncData ) ) ]
575+ public virtual async Task Parameter_collection_Count_with_column_predicate_with_default_parameters_EF_Constant ( bool async )
538576 {
539- await base . Parameter_collection_Count_with_column_predicate_with_default_parameters_EF_Constant ( ) ;
577+ var ( _, entityId ) = ( 2 , 999 ) ;
578+
579+ await AssertQuery (
580+ async ,
581+ ss => ss. Set < TestEntity > ( ) . Where ( x => new [ ] { _ , entityId } . Count ( i => i > x . Id ) == 1 ) ) ;
540582
541583 AssertSql (
542584$ """
@@ -549,9 +591,15 @@ SELECT COUNT(*)
549591""" ) ;
550592 }
551593
552- public override async Task Parameter_collection_of_ints_Contains_int_with_default_parameters_EF_Constant ( )
594+ [ ConditionalTheory ]
595+ [ MemberData ( nameof ( IsAsyncData ) ) ]
596+ public virtual async Task Parameter_collection_of_ints_Contains_int_with_default_parameters_EF_Constant ( bool async )
553597 {
554- await base . Parameter_collection_of_ints_Contains_int_with_default_parameters_EF_Constant ( ) ;
598+ var ( _, entityId ) = ( 2 , 999 ) ;
599+
600+ await AssertQuery (
601+ async ,
602+ ss => ss. Set < TestEntity > ( ) . Where ( x => new [ ] { _ , entityId } . Contains ( x . Id ) ) ) ;
555603
556604 AssertSql (
557605"""
@@ -576,14 +624,21 @@ public override async Task Project_collection_from_entity_type_with_owned()
576624 public virtual void Check_all_tests_overridden ( )
577625 => MySqlTestHelpers . AssertAllMethodsOverridden ( GetType ( ) ) ;
578626
579- protected override DbContextOptionsBuilder SetTranslateParameterizedCollectionsToConstants ( DbContextOptionsBuilder optionsBuilder )
627+ protected override DbContextOptionsBuilder SetParameterizedCollectionMode ( DbContextOptionsBuilder optionsBuilder , ParameterTranslationMode mode )
628+ {
629+ // MySQL-specific parameter handling configuration
630+ // For now, use default MySQL behavior as the implementation is provider-specific
631+ return optionsBuilder ;
632+ }
633+
634+ protected virtual DbContextOptionsBuilder SetTranslateParameterizedCollectionsToConstants ( DbContextOptionsBuilder optionsBuilder )
580635 {
581636 new MySqlDbContextOptionsBuilder ( optionsBuilder ) . TranslateParameterizedCollectionsToConstants ( ) ;
582637
583638 return optionsBuilder ;
584639 }
585640
586- protected override DbContextOptionsBuilder SetTranslateParameterizedCollectionsToParameters ( DbContextOptionsBuilder optionsBuilder )
641+ protected virtual DbContextOptionsBuilder SetTranslateParameterizedCollectionsToParameters ( DbContextOptionsBuilder optionsBuilder )
587642 {
588643 new MySqlDbContextOptionsBuilder ( optionsBuilder ) . TranslateParameterizedCollectionsToParameters ( ) ;
589644
0 commit comments