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()) {