DictionaryConverter.writeToProperty Enhancement

1 view
Skip to first unread message

Dennis

unread,
Dec 3, 2009, 3:36:48 PM12/3/09
to FubuMVC Development Group
Please consider adding this fix to properly convert a string value to
a guid....


if (prop.PropertyType == typeof(Guid))
{
prop.SetValue(item, new Guid(value.ToString
()), null);
return;
}


Given a view model like this....

public class Test
{
[Required]
public virtual Guid TestId { get; set; }
}


The Convert.ChangeType(..) method canNOT convert strings to GUID's.


Thanks
Dennis

Chad Myers

unread,
Dec 10, 2009, 4:06:33 PM12/10/09
to fubumv...@googlegroups.com
This should be fixed now in both the /trunk and /branches/semode_rewrite branch.

I'll be updating the reboot branch soon.

-Chad


--

You received this message because you are subscribed to the Google Groups "FubuMVC Development Group" group.
To post to this group, send email to fubumv...@googlegroups.com.
To unsubscribe from this group, send email to fubumvc-deve...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/fubumvc-devel?hl=en.



Dennis

unread,
Dec 10, 2009, 4:33:15 PM12/10/09
to FubuMVC Development Group
Nice. Thanks Chad

We should talk soon about some other recommendations.

Thanks
Dennis
Reply all
Reply to author
Forward
0 new messages