Fix CommandBuilder not appending output parameters on cached command
This commit is contained in:
parent
ccd824dcc3
commit
d92f0a6f82
@ -47,18 +47,19 @@ internal abstract class CommandBuilder
|
|||||||
|
|
||||||
foreach (var parameter in existing.Parameters)
|
foreach (var parameter in existing.Parameters)
|
||||||
{
|
{
|
||||||
if (parameter.Direction == ParameterDirection.Input)
|
if (ResolveProperty(parameter.Name) is PropertyInfo property)
|
||||||
{
|
{
|
||||||
if (ResolveProperty(parameter.Name) is PropertyInfo property)
|
result.AddParameter(new StorageParameter
|
||||||
{
|
{
|
||||||
result.AddParameter(new StorageParameter
|
Value = parameter.Direction switch
|
||||||
{
|
{
|
||||||
Value = GetValue(property),
|
ParameterDirection.Input => GetValue(property),
|
||||||
Name = parameter.Name,
|
_ => default
|
||||||
Type = parameter.Type,
|
},
|
||||||
Direction = parameter.Direction
|
Name = parameter.Name,
|
||||||
});
|
Type = parameter.Type,
|
||||||
}
|
Direction = parameter.Direction
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user