mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-04-22 02:32:50 +08:00
- 修复 Ado.CommandFluent 存储过程参数化问题;#739
This commit is contained in:
parent
2349e30753
commit
7a33511d61
@ -60,6 +60,7 @@ namespace FreeSql.Internal.Model
|
|||||||
public AdoCommandFluent WithParameter(string parameterName, object value, Action<DbParameter> modify = null)
|
public AdoCommandFluent WithParameter(string parameterName, object value, Action<DbParameter> modify = null)
|
||||||
{
|
{
|
||||||
var param = this.Ado.GetDbParamtersByObject(new Dictionary<string, object> { [parameterName] = value }).FirstOrDefault();
|
var param = this.Ado.GetDbParamtersByObject(new Dictionary<string, object> { [parameterName] = value }).FirstOrDefault();
|
||||||
|
if (CmdType == System.Data.CommandType.StoredProcedure) param.ParameterName = parameterName; //#739
|
||||||
modify?.Invoke(param);
|
modify?.Invoke(param);
|
||||||
this.CmdParameters.Add(param);
|
this.CmdParameters.Add(param);
|
||||||
return this;
|
return this;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user