Should ActionResult perform other tasks too

Posted by Ori on Stack Overflow See other posts from Stack Overflow or by Ori
Published on 2009-12-08T07:40:59Z Indexed on 2010/04/01 2:13 UTC
Read the original article Hit count: 311

In Asp.net MVC one is encouraged to derive custom ActionResults, however should these classes handle other tasks unrelated to views, perhaps a EmailActionResult would render a view then send an email. What is best practice for the class ActionResult, is it only view specific? I want to keep things DRY too. Should the sending of the email be factored into a service class? perhaps using a filter would work. what are your thoughts?

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about asp.net-mvc