Fix cached command builder
This commit is contained in:
parent
5b0537a04a
commit
9209bada7a
@ -28,10 +28,12 @@ internal abstract class CommandBuilder
|
||||
|
||||
if (TryGetExisting(out StorageOperation? existing))
|
||||
{
|
||||
if (existing is null)
|
||||
return null;
|
||||
/*
|
||||
* We need to rebuild an instance since StorageOperation
|
||||
* is immutable
|
||||
*/
|
||||
* We need to rebuild an instance since StorageOperation
|
||||
* is immutable
|
||||
*/
|
||||
var result = new StorageOperation
|
||||
{
|
||||
CommandText = existing.CommandText,
|
||||
@ -43,7 +45,7 @@ internal abstract class CommandBuilder
|
||||
if (result.Parameters is null)
|
||||
return result;
|
||||
|
||||
foreach (var parameter in result.Parameters)
|
||||
foreach (var parameter in existing.Parameters)
|
||||
{
|
||||
if (parameter.Direction == ParameterDirection.Input)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user