获取存储过程参数的方法可以追加其他参数
This commit is contained in:
parent
bfe7ecd81a
commit
ee3e44afb3
|
@ -192,10 +192,14 @@ namespace Falcon.SugarApi.DatabaseDefinitions
|
|||
/// </summary>
|
||||
/// <typeparam name="T">对象类型</typeparam>
|
||||
/// <param name="data">参数对象</param>
|
||||
/// <param name="otherParams">增加其他的参数</param>
|
||||
/// <returns>参数</returns>
|
||||
/// <exception cref="NotSupportedException"></exception>
|
||||
public SugarParameter[] GetParameters<T>(T data) {
|
||||
return this.Ado.GetParameters(data);
|
||||
public SugarParameter[] GetParameters<T>(T data, params SugarParameter[] otherParams) {
|
||||
var result = this.Ado.GetParameters(data).ToList();
|
||||
if (otherParams != null) {
|
||||
result.AddRange(otherParams);
|
||||
}
|
||||
return result.ToArray();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
Loading…
Reference in New Issue
Block a user