File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
src/EFCore.PG/Infrastructure/Internal Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -126,6 +126,7 @@ public NpgsqlOptionsExtension(NpgsqlOptionsExtension copyFrom)
126126 DataSourceBuilderAction = copyFrom . DataSourceBuilderAction ;
127127 AdminDatabase = copyFrom . AdminDatabase ;
128128 _postgresVersion = copyFrom . _postgresVersion ;
129+ _parameterizedCollectionMode = copyFrom . _parameterizedCollectionMode ;
129130 UseRedshift = copyFrom . UseRedshift ;
130131 _userRangeDefinitions = [ ..copyFrom . _userRangeDefinitions ] ;
131132 _enumDefinitions = [ ..copyFrom . _enumDefinitions ] ;
Original file line number Diff line number Diff line change @@ -26,6 +26,21 @@ public void Can_add_extension_with_command_timeout()
2626 Assert . Equal ( 30 , extension . CommandTimeout ) ;
2727 }
2828
29+ [ ConditionalFact ]
30+ public void ParameterizedCollectionMode_is_preserved_after_clone ( )
31+ {
32+ var optionsBuilder = new DbContextOptionsBuilder ( ) ;
33+ optionsBuilder . UseNpgsql ( "Database=Crunchie" , b =>
34+ {
35+ b . UseParameterizedCollectionMode ( ParameterTranslationMode . MultipleParameters ) ;
36+ b . UseRelationalNulls ( ) ;
37+ } ) ;
38+
39+ var extension = optionsBuilder . Options . Extensions . OfType < NpgsqlOptionsExtension > ( ) . Single ( ) ;
40+
41+ Assert . Equal ( ParameterTranslationMode . MultipleParameters , extension . ParameterizedCollectionMode ) ;
42+ }
43+
2944 [ ConditionalFact ]
3045 public void Can_add_extension_with_connection_string ( )
3146 {
You can’t perform that action at this time.
0 commit comments