/// <summary> /// 将Request里的参数转成SqlParameter[] /// </summary> /// <returns></returns> internal static void RequestParasToSqlParameters(SqlParameterCollection oldParas) { var oldParaList = oldParas.Cast <SqlParameter>().ToList(); var paraDictionarAll = SqlSugarTool.GetParameterDictionary(); if (paraDictionarAll != null && paraDictionarAll.Count() > 0) { foreach (KeyValuePair <string, string> it in paraDictionarAll) { var par = new SqlParameter("@" + it.Key, it.Value); if (!oldParaList.Any(oldPara => oldPara.ParameterName == ("@" + it.Key))) { oldParas.Add(par); } } } }