Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dapper/SqlMapper.Async.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1042,7 +1042,7 @@ public static async Task<GridReader> QueryMultipleAsync(this IDbConnection cnn,
cmd = command.TrySetupAsyncCommand(cnn, info.ParamReader);
reader = await ExecuteReaderWithFlagsFallbackAsync(cmd, wasClosed, CommandBehavior.SequentialAccess, command.CancellationToken).ConfigureAwait(false);

var result = new GridReader(cmd, reader, identity, command.Parameters as DynamicParameters, command.AddToCache, command.CancellationToken);
var result = new GridReader(cmd, reader, identity, command.Parameters as IParameterCallbacks, command.AddToCache, command.CancellationToken);
wasClosed = false; // *if* the connection was closed and we got this far, then we now have a reader
// with the CloseConnection flag, so the reader will deal with the connection; we
// still need something in the "finally" to ensure that broken SQL still results
Expand Down
2 changes: 1 addition & 1 deletion Dapper/SqlMapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1155,7 +1155,7 @@ private static GridReader QueryMultipleImpl(this IDbConnection cnn, ref CommandD
cmd = command.SetupCommand(cnn, info.ParamReader);
reader = ExecuteReaderWithFlagsFallback(cmd, wasClosed, CommandBehavior.SequentialAccess);

var result = new GridReader(cmd, reader, identity, command.Parameters as DynamicParameters, command.AddToCache);
var result = new GridReader(cmd, reader, identity, command.Parameters as IParameterCallbacks, command.AddToCache);
cmd = null; // now owned by result
wasClosed = false; // *if* the connection was closed and we got this far, then we now have a reader
// with the CloseConnection flag, so the reader will deal with the connection; we
Expand Down