Automatic null model checks in ASP.NET MVC
Read OriginalThis 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.
Comments
No comments yet
Be the first to share your thoughts!
Browser Extension
Get instant access to AllDevBlogs from your browser