SugarDbContext.GetParameters方法可以传入null值参数

This commit is contained in:
falcon 2022-04-08 11:06:47 +08:00
parent e16e28da2d
commit f576b9ff34

View File

@ -197,7 +197,7 @@ namespace Falcon.SugarApi.DatabaseDefinitions
/// <param name="otherParams">增加其他的参数</param>
/// <returns>参数</returns>
public SugarParameter[] GetParameters<T>(T data, params SugarParameter[] otherParams) {
var result = this.Ado.GetParameters(data).ToList();
var result = data == null ? new List<SugarParameter>() : this.Ado.GetParameters(data).ToList();
if (otherParams != null) {
result.AddRange(otherParams);
}