Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 506015
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T06:39:26+00:00 2026-05-13T06:39:26+00:00

In Asp.net MVC one is encouraged to derive custom ActionResults, however should these classes

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T06:39:27+00:00Added an answer on May 13, 2026 at 6:39 am

    No.

    The ActionResult should be the Result of the Action, it should not also perform the action.

    In your specific case, you should have refactor the emailsending into a service class and then use the ActionResult to indicate what exactly happened.

    I am hard pressed to imagine a “simple” EmailActionResult that is reusable enough to handle different scenarios.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How should one split up the controllers in an ASP.NET MVC site? For example,
Defining a model in ASP.NET MVC you can have the classes in one *.cs
I have separate project with some of my custom ASP.NET MVC helpers In one
In ASP.NET MVC, Where should one work with view models? Should this be done
Is there a de-facto solution for ASP.NET MVC 3+ one should use in case
I have one asp.net mvc 3 application (www.name.com) with custom module added to web.config:
I've built a web site on ASP.NET MVC and one little section of it
I'm converting one of our ASP.NET MVC application from 1.0 to 2.0. This is
I have an ASP.NET MVC application that has one part where I dont really
i need to have one project on asp.net mvc 1 but i want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.