From 01a07b3c4946ed88afe74c89ecd54c3260eb6cc4 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Mon, 29 May 2017 13:31:58 +0800 Subject: [PATCH] - --- .../SqlServer/SqlServerProvider.cs | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/SqlSugar/Realization/SqlServer/SqlServerProvider.cs b/SqlSugar/Realization/SqlServer/SqlServerProvider.cs index e48af3e01..44f431279 100644 --- a/SqlSugar/Realization/SqlServer/SqlServerProvider.cs +++ b/SqlSugar/Realization/SqlServer/SqlServerProvider.cs @@ -77,19 +77,19 @@ namespace SqlSugar { if (parameters == null || parameters.Length == 0) return null; SqlParameter[] result = new SqlParameter[parameters.Length]; - int i = 0; + int index = 0; foreach (var parameter in parameters) { if (parameter.Value == null) parameter.Value = DBNull.Value; - var p = new SqlParameter(); - p.ParameterName = parameter.ParameterName; - p.UdtTypeName = parameter.UdtTypeName; - p.Size = parameter.Size; - p.Value = parameter.Value; - p.DbType = parameter.DbType; - p.Direction = parameter.Direction; - result[i] = p; - ++i; + var sqlParameter = new SqlParameter(); + sqlParameter.ParameterName = parameter.ParameterName; + sqlParameter.UdtTypeName = parameter.UdtTypeName; + sqlParameter.Size = parameter.Size; + sqlParameter.Value = parameter.Value; + sqlParameter.DbType = parameter.DbType; + sqlParameter.Direction = parameter.Direction; + result[index] = sqlParameter; + ++index; } return result; }