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 3347332
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T01:24:33+00:00 2026-05-18T01:24:33+00:00

This is an ASP.NET MVC website. Following domain driven design, we have a service

  • 0

This is an ASP.NET MVC website.

Following domain driven design, we have a service layer. Our controllers ask application service classes to perform various tasks and then route the results to views.

Business logic is carried out by the service classes.

So for example, I may have an AccountTasks class which is responsible for signing up users, editing their preferences, etc. Now I need to be able to also automatically subscribe the user to a newsletter as soon as they sign up or update their user preferences (then I’d change the newsletter subscription).

The newsletter subscription functionality is thus closely tied to account registration/modification.

However, I feel like it would be better to have a separate NewsletterTasks service class to deal with subscribe/update/unsubscribe actions.

But this class would not be used by the controller, but the AccountTasks class.

So, the workflow would be like this:

-> request made to controller action

-> controller calls AccountTasks

-> AccountTasks creates a user acoount

-> AccountTasks calls NewsletterTasks

-> NewsletterTasks subscribes the user to the newsletter

-> AccountTasks returns the result to the controller

-> controller fetches the appropriate view and sends it to the client

Alternatively, I would have the controller call the AccountTasks first, then using the result call the NewsletterTasks. But with this approach I feel like the controller knows too much about the workflow, whereas it should simply pass around the data and results.

Tasks are Application Service classes, the project is based on S#arp Architecture with some modifications coming from Who Can Help Me – that includes naming conventions for some things.

Is it OK to call NewsletterTasks from AccountTasks? How would you do this?

  • 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-18T01:24:34+00:00Added an answer on May 18, 2026 at 1:24 am

    I’d be tempted to create an explicit UserRegistration Domain Service:

    -> request made to controller action
    
    -> controller calls UserRegistrationService
    
    -> UserRegistrationService calls AccountTasks
    
    -> AccountTasks creates a user acoount
    
    -> UserRegistrationService calls NewsletterTasks
    
    -> NewsletterTasks subscribes the user to the newsletter
    
    -> UserRegistrationService returns the result to the controller
    
    -> controller fetches the appropriate view and sends it to the client
    

    Which in turn answers your question: Yes, it’s OK to call other Services from your Service

    Hope that helps!

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

Sidebar

Related Questions

I was following this tutorial - Getting Started with an ASP.NET MVC 3 Website
i have an asp.net mvc website. http:/mywebsite.com (just for this example) I have been
when I access any page of my ASP.NET MVC website first time, then this
I'm trying to deploy my new ASP.NET MVC 2.0 website to our Windows Server
I have a website made in Asp.net MVC which is installed in the root
I noticed the following: An ASP.NET MVC website under development gets an SQL error
I have an asp.net-mvc website and i am reading in Json string from a
I have a single-page JavaScript application, held within an ASP.NET MVC 3 website. In
I have an ASP.NET MVC website. In my backend I have a table called
I have an ASP.NET MVC website and an area project called 'Admin'. So far

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.