Ben Foster 7/11/2012

Automatic null model checks in ASP.NET MVC

Read Original

This technical article details the creation and use of a 'NullModelCheckAttribute' Action Filter for ASP.NET MVC. It automates the common pattern of checking if a view model is null and returning a 404 (or other status) response, cleaning up controller actions. The filter works with both full and partial views and discusses integration with other filters like AutoFormatResult.

Automatic null model checks in ASP.NET MVC

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser