Say I have a Dictionary
and I want to update an object with the values from the dictionary, just like model binding in MVC... how would yo
You can do that, but you would still need to reference System.Web.Mvc, obviously. It is more or less a matter of constructing a ModelBinder, perhaps the DefaultModelBinder
, then call it with the appropiate arguments - but those arguments, unfortunately, is very closely bound to the web scenario.
Depending on what you exactly want, it might make more sense to roll your own simple reflection based solution.