Hi,

The following method in src/DbLinq/Data/Linq/Sugar/
ParameterizedQuery.cs seems to cause a problem on Mono 2.4.2.3:

private object NormalizeDbType(object value)
{
    System.Data.Linq.Binary b = value as System.Data.Linq.Binary;
    if (b != null)
        return b.ToArray();
    return value;
}

The line "if (b != null)" causes a "System.NotImplementedException".
"value" contained a string. This is quite probably a bug in Mono, but
until it is investigated / fixed I propose the following change which
solves the issue on my system by making the null check implicitly part
of an "is" test:

--- src/DbLinq/Data/Linq/Sugar/ParameterizedQuery.cs    (revision 1271)
+++ src/DbLinq/Data/Linq/Sugar/ParameterizedQuery.cs    (working copy)
@@ -73,12 +73,8 @@

         private object NormalizeDbType(object value)
         {
-                       if (value is System.Data.Linq.Binary)
-                       {
-               System.Data.Linq.Binary b = value as
System.Data.Linq.Binary;
-               if (b != null)
-                       return b.ToArray();
-                       }
+           if (value is System.Data.Linq.Binary)
+               return ((System.Data.Linq.Binary)(value)).ToArray();
             return value;
         }

Regards,
Thomas

--

You received this message because you are subscribed to the Google Groups 
"DbLinq" group.
To post to this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/dblinq?hl=.


Reply via email to