I'm looking for a set of best practices to use when implementing IModelBinder
.
I've read three different MVC books and each one does some slightly different stuff in their implementations without any real explanation.
IModelBinder
DefaultModelBinder
rather than direct implementation of IModelBinder
, but I don't really see how to leverage the benefitsModelState.SetModelValue()
to follow convention.I just want to make sure that my model binders are following conventions, and that I properly understand the entire ModelBindingContext
.
Any tips, tricks, GOOD tutorials to recommend?
K Scott Allen has some tips about Model Binding: http://odetocode.com/blogs/scott/archive/2009/04/27/6-tips-for-asp-net-mvc-model-binding.aspx.