float --> Double not mapped?

May 5, 2009 at 12:12 PM

Is there a reason a float datatype in a CRM entity is not mapped to Double by the query provider?

I added it, CrmQueryProvider.cs,line 225: case "Double": return Double.Parse(value);

May 5, 2009 at 2:26 PM
Hm, that may be an omision. CRM floats should probably be mapped to .Net floats however. Could you provide the entire method as you have it now?
May 5, 2009 at 2:46 PM
I just added the bold line below.

        private object CreateValueProperty(Type type, string value)
            if (type.IsEnum)
                return Enum.Parse(type, value);
            switch (type.Name)
                case "Boolean": return (value == "1");
                case "String": return value;
                case "Guid": return new Guid(value);
                case "Int32": return Int32.Parse(value);
                case "Decimal": return Decimal.Parse(value);
                case "Double": return Double.Parse(value);
            throw new NotSupportedException(type.Name);
May 5, 2009 at 3:34 PM
This is already in the code, perhaps you are using an old version? Or maybe this has only appeared in svn...
May 5, 2009 at 8:28 PM
I think it only appeared in svn. I downloaded the one from the download page.