Is model binding possible without mvc?
问题 Say I have a Dictionary<string, string> and I want to update an object with the values from the dictionary, just like model binding in MVC... how would you do that without MVC? 回答1: You could use the DefaultModelBinder to achieve this but you will need to reference the System.Web.Mvc assembly to your project. Here's an example: using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Globalization; using System.Linq; using System.Web.Mvc;