Skip to content

Commit bc5def3

Browse files
Pass DbContext to RelationalCommandParameterObject (#36286)
- Make `DbContext` available from `RelationalCommandParameterObject` for interception with SQLite and querying enumerables. Relates to #16159
1 parent b7799bb commit bc5def3

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/EFCore.Relational/Query/Internal/GroupBySingleQueryingEnumerable.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ public virtual DbCommand CreateDbCommand()
145145
_relationalQueryContext.Connection,
146146
_relationalQueryContext.Parameters,
147147
null,
148-
null,
148+
_relationalQueryContext.Context,
149149
null, CommandSource.LinqQuery),
150150
Guid.Empty,
151151
(DbCommandMethod)(-1));

src/EFCore.Relational/Query/Internal/GroupBySplitQueryingEnumerable.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ public virtual DbCommand CreateDbCommand()
155155
_relationalQueryContext.Connection,
156156
_relationalQueryContext.Parameters,
157157
null,
158-
null,
158+
_relationalQueryContext.Context,
159159
null, CommandSource.LinqQuery),
160160
Guid.Empty,
161161
(DbCommandMethod)(-1));

src/EFCore.Relational/Query/Internal/SingleQueryingEnumerable.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public virtual DbCommand CreateDbCommand()
129129
_relationalQueryContext.Connection,
130130
_relationalQueryContext.Parameters,
131131
null,
132-
null,
132+
_relationalQueryContext.Context,
133133
null, CommandSource.LinqQuery),
134134
Guid.Empty,
135135
(DbCommandMethod)(-1));

src/EFCore.Sqlite.Core/Storage/Internal/SqliteDatabaseCreator.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public override void Create()
5252
Dependencies.Connection,
5353
null,
5454
null,
55-
null,
55+
Dependencies.CurrentContext.Context,
5656
Dependencies.CommandLogger, CommandSource.Migrations));
5757

5858
Dependencies.Connection.Close();
@@ -101,7 +101,7 @@ public override bool HasTables()
101101
Dependencies.Connection,
102102
null,
103103
null,
104-
null,
104+
Dependencies.CurrentContext.Context,
105105
Dependencies.CommandLogger, CommandSource.Migrations))!;
106106

107107
return count != 0;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy