How can I assign more than one ValueProvider to ModelBindingContext when testing a custom model bind
- by Byron Sommardahl
I have a custom model binder that uses data from session, tempdata, and form collection (hypothetically, of course!). When testing my model binder, need to create a ModelBindingContext with a ValueProvider. Trouble is, I can't see how I can have one ValueProvider that serves multiple value provider types. Any words of wisdom?
ValidModelBindingContext = new ModelBindingContext
{
ModelName = "SomeModel",
ValueProvider = ValidFormValueCollection
};