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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T04:11:27+00:00 2026-05-14T04:11:27+00:00

I recently started reading about ASP.net MVC and after getting excited about the concept,

  • 0

I recently started reading about ASP.net MVC and after getting excited about the concept, i started to migrate all my webform project to MVC but i am having a hard time keeping my controller skinny even after following all the good advices out there (or maybe i just don’t get it … ).
The website i deal with has Articles, Videos, Quotes … and each of these entities have categories, comments, images that can be associated with it. I am using Linq to sql for database operations and for each of these Entities, i have a Repository, and for each repository, i create a service to be used in the controller.

so i have –

  • ArticleRepository
  • ArticleCategoryRepository
  • ArticleCommentRepository

and the corresponding service

  • ArticleService
  • ArticleCategoryService …

you see the picture.

The problem i have is that i have one controller for article,category and comment because i thought that having ArticleController handle all of that might make sense, but now i have to pass all of the services needed to the Controller constructor. So i would like to know what it is that i am doing wrong. Are my services not designed properly? should i create Bigger service to encapsulate smaller services and use them in my controller? or should i have an articleCategory Controller and an articleComment Controller?

A page viewed by the user is made of all of that, thee article to be viewed,the comments associated with it, a listing of the categories to witch it applies … how can i efficiently break down the controller to keep it “skinny” and solve my headache?

Thank you!
I hope my question is not too long to be read …

  • 1 1 Answer
  • 2 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-14T04:11:28+00:00Added an answer on May 14, 2026 at 4:11 am

    This is the side effect of following the Single Responsibility Pattern. If each class is designed for only one purpose, then you’re going to end up with a lot of classes. This is a good thing. Don’t be afraid of it. It will make your life a lot easier in the long run when it comes to swapping out components as well as debugging which components of your system aren’t working.

    Personally, I prefer putting more of my domain logic in the actual domain entities (e.g. article.AddComment(comment) instead of articleCommentService.AddComment(article, comment)), but your approach is perfectly fine as well.

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

Sidebar

Related Questions

I recently started learning about ASP.Net MVC and its various features MVC_3_MUSIC_STORE + CODE
I have recently started reading about dependency injection and it has made me rethink
I recently started looking into building web applications using .NET MVC and I stumbled
I have recently started work on a large project in .net (C#) and I
I support corporate intraweb ASP.NET WebForms application. Recently users started to experience extremely slow
I recently started reading about CoffeeScript http://jashkenas.github.com/coffee-script/ and it looks absolutely amazing! However I
I recently started reading Evans' Domain-Driven design book and started a small sample project
I've recently started reading up on Rails and while getting my development environment ready
I have recently started reading about Java EE6 and in the examples I follow
I recently started learning JavaFX. At the moment I can't build any JavaFX project

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.