This is an automated email from the ASF dual-hosted git repository.

ptupitsyn pushed a commit to branch ignite-22133-bak
in repository https://gitbox.apache.org/repos/asf/ignite-3.git

commit e6564b17a53cb88fda1d45b50c5167a5c9e852ec
Author: Pavel Tupitsyn <[email protected]>
AuthorDate: Fri Jul 11 13:37:37 2025 +0300

    Convert DBNull to null
---
 .../DataCommon/IgniteCommand.cs                    | 28 ++++++++++++++++++----
 1 file changed, 23 insertions(+), 5 deletions(-)

diff --git 
a/modules/platforms/dotnet/Apache.Ignite.EntityFrameworkCore/DataCommon/IgniteCommand.cs
 
b/modules/platforms/dotnet/Apache.Ignite.EntityFrameworkCore/DataCommon/IgniteCommand.cs
index d85955ff17b..3bba3d2d7ec 100644
--- 
a/modules/platforms/dotnet/Apache.Ignite.EntityFrameworkCore/DataCommon/IgniteCommand.cs
+++ 
b/modules/platforms/dotnet/Apache.Ignite.EntityFrameworkCore/DataCommon/IgniteCommand.cs
@@ -140,10 +140,8 @@ public class IgniteCommand : DbCommand
 
     protected override DbParameter CreateDbParameter() => new 
IgniteParameter();
 
-    protected override DbDataReader ExecuteDbDataReader(CommandBehavior 
behavior)
-    {
-        throw new NotImplementedException();
-    }
+    protected override DbDataReader ExecuteDbDataReader(CommandBehavior 
behavior) =>
+        ExecuteDbDataReaderAsync(behavior, 
CancellationToken.None).GetAwaiter().GetResult();
 
     private ISql GetSql()
     {
@@ -165,5 +163,25 @@ public class IgniteCommand : DbCommand
             ? igniteTx.InternalTransaction
             : null;
 
-    private object[] GetArgs() => _parameters?.ToObjectArray() ?? [];
+    private object[] GetArgs()
+    {
+        if (_parameters == null || _parameters.Count == 0)
+        {
+            // No parameters, return an empty array.
+            return [];
+        }
+
+        var arr = new object[_parameters.Count];
+
+        for (var i = 0; i < _parameters.Count; i++)
+        {
+            arr[i] = _parameters[i].Value switch
+            {
+                DBNull => null,
+                var other => other
+            };
+        }
+
+        return arr;
+    }
 }

Reply via email to