Beware of breaking changes to ModelBindingContext in MVC2 Preview 2

ASP.NET MVC2 Preview 2 was released earlier today. One thing to be aware of is the breaking changes to the ModelBindingContext.

Both the Model and ModelType properties are obsolete and their setters throw exceptions. However, they are not marked with the obsolete attribute so you will not get a compiler warning if you are using them - you will only get an exception at runtime.

Written on October 1, 2009