Próbuję uaktualnić mój projekt MVC 1 do MVC 2 RC. Obecnie mamy niestandardowy modelarinder, który dodaje elementy do ValueProvider (działało to, gdy był słownikiem). Następnie przekazaliśmy to domyślnemu modelowi. Jednak IValueProvider nie ma metody dodawania, więc ten algorytm nie działa. Czy ktoś wie o sposobie dodawania wartości do ValueProvider w MVC 2?ASP.NET MVC 2 - Ustawianie wartości na IValueProvider
foreach(string valKey in controllerContext.RequestContext.HttpContext.Request.Form.AllKeys.Where(x => x.StartsWith(valuesToChangePrefix)))
{
string valName = valKey.Substring(valuesToChangePrefix.Length);
string myVal = ManipulateValue(bindingContext.ValueProvider.GetValue(valKey).AttemptedValue);
// This is where I need to add to my value Provider (As you can see I used to just assign a ValueProviderResult
//bindingContext.ValueProvider = new ValueProviderResult(myVal.Split(','), myVal, bindingContext.ValueProvider.GetValue(valKey).Culture);
}
Ten sam problem w tej chwili, nie mogę znaleźć żadnej przyzwoitej dokumentacji na temat implementacji niestandardowych segregatorów modeli dla MVC2 w dowolnym miejscu. –