Nullable<> as TModel for ViewPage
- by Alexander Prokofyev
What are the possible reasons what Nullable<> types are disallowed to be passed as TModel parameter of System.Web.Mvc.ViewPage<TModel> generic? This could be handy sometimes.
In ASP.NET MVC source defined what TModel should be a class:
public class ViewPage<TModel> : ViewPage where TModel : class
but Nullable types are value types. Maybe definition could be less restrictive...