mirror of
				https://github.com/nsnail/FreeSql.git
				synced 2025-11-04 17:20:49 +08:00 
			
		
		
		
	- 修复 Ado.CommandFluent 存储过程参数化问题;#739
This commit is contained in:
		@@ -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;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user