From 34ddcc5568b0ef4d9f1644a26de87bc69410a215 Mon Sep 17 00:00:00 2001 From: sunkaixuna <610262374@qq.com> Date: Mon, 9 Aug 2021 18:01:41 +0800 Subject: [PATCH] Compatible with new drivers --- .../SqlSugar/Realization/SqlServer/SqlServerProvider.cs | 4 ++++ .../SqlSugar/Realization/SqlServer/SqlServerProvider.cs | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/Src/Asp.Net/SqlSugar/Realization/SqlServer/SqlServerProvider.cs b/Src/Asp.Net/SqlSugar/Realization/SqlServer/SqlServerProvider.cs index 0ed776dce..3e3a801bc 100644 --- a/Src/Asp.Net/SqlSugar/Realization/SqlServer/SqlServerProvider.cs +++ b/Src/Asp.Net/SqlSugar/Realization/SqlServer/SqlServerProvider.cs @@ -138,6 +138,10 @@ namespace SqlSugar sqlParameter.Value = Convert.ToDateTime("1753/01/01"); } } + if (parameter.Direction == 0) + { + parameter.Direction = ParameterDirection.Input; + } sqlParameter.Direction = parameter.Direction; result[index] = sqlParameter; if (parameter.TypeName.HasValue()) { diff --git a/Src/Asp.NetCore2/SqlSeverTest/SqlSugar/Realization/SqlServer/SqlServerProvider.cs b/Src/Asp.NetCore2/SqlSeverTest/SqlSugar/Realization/SqlServer/SqlServerProvider.cs index c04a5eead..8b410b9b2 100644 --- a/Src/Asp.NetCore2/SqlSeverTest/SqlSugar/Realization/SqlServer/SqlServerProvider.cs +++ b/Src/Asp.NetCore2/SqlSeverTest/SqlSugar/Realization/SqlServer/SqlServerProvider.cs @@ -138,6 +138,10 @@ namespace SqlSugar sqlParameter.Value = Convert.ToDateTime("1753/01/01"); } } + if (parameter.Direction == 0) + { + parameter.Direction = ParameterDirection.Input; + } sqlParameter.Direction = parameter.Direction; result[index] = sqlParameter; if (parameter.TypeName.HasValue()) {