diff --git a/Frends.MicrosoftSQL.ExecuteQuery/Frends.MicrosoftSQL.ExecuteQuery.Tests/NonQueryUnitTests.cs b/Frends.MicrosoftSQL.ExecuteQuery/Frends.MicrosoftSQL.ExecuteQuery.Tests/NonQueryUnitTests.cs index 5e46a1c..f37ed72 100644 --- a/Frends.MicrosoftSQL.ExecuteQuery/Frends.MicrosoftSQL.ExecuteQuery.Tests/NonQueryUnitTests.cs +++ b/Frends.MicrosoftSQL.ExecuteQuery/Frends.MicrosoftSQL.ExecuteQuery.Tests/NonQueryUnitTests.cs @@ -135,8 +135,6 @@ public async Task TestExecuteQuery_NonQuery() [TestMethod] public async Task TestExecuteQuery_DBNullValues() { - - var options = new Options() { SqlTransactionIsolationLevel = SqlTransactionIsolationLevel.Default, diff --git a/Frends.MicrosoftSQL.ExecuteQuery/Frends.MicrosoftSQL.ExecuteQuery/ExecuteQuery.cs b/Frends.MicrosoftSQL.ExecuteQuery/Frends.MicrosoftSQL.ExecuteQuery/ExecuteQuery.cs index 9054eeb..50a9e13 100644 --- a/Frends.MicrosoftSQL.ExecuteQuery/Frends.MicrosoftSQL.ExecuteQuery/ExecuteQuery.cs +++ b/Frends.MicrosoftSQL.ExecuteQuery/Frends.MicrosoftSQL.ExecuteQuery/ExecuteQuery.cs @@ -44,7 +44,7 @@ public static async Task ExecuteQuery([PropertyTab] Input input, [Proper if (parameter.Value == null) { command.Parameters.AddWithValue(parameterName: parameter.Name, value: DBNull.Value); - } + } else if (parameter.Value.GetType() == typeof(JValue)) { if (((JToken)parameter.Value).Type == JTokenType.Null)