Another stellar turnout at the July Meeting of the Tampa ASP.NET MVC Developer Group, entitled ASP.NET MVC Extensibility. The room was packed despite the torrential rains that try to keep us from our meetings ;)
During the meeting, I did a quick 20 minute presentation on custom ActionFilters. Wanting to show something a bit fresh, I decided to show off Jimmy Bogard's example of using a custom ActionFilter with AutoMapper to map a domain model entity to a view model class. I took his code along with some additional pieces and added it to the code I had written for Homework Assignment #2.
Although the example is too trivial for real world use of a View Model and AutoMapper, I wanted to show off a custom ActionFilter that might be of use to you in more complex applications where you need a separate View Model from the Domain Model.
Hope you enjoy the code.
David Hayden
Related Posts: