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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T19:05:29+00:00 2026-06-17T19:05:29+00:00

I am working on ASP.NET MVC3 solution that uses dependency injection with autofac. Our

  • 0

I am working on ASP.NET MVC3 solution that uses dependency injection with autofac.
Our controllers are being created by autofac and properly and all required objects are being properly passed in. Those objects usually include services, repositories, and mappers converting domain object to MVC (view) models. So the controller constructor looks somewhat like:

public abcController(
        ILogger logger,
        IabcRepository abcRepository,
        IabcService abcService,
        IMapper<AbcDomain, AbcViewModel> abcMapper,
        ...
        )

Unfortunately, in time, those constructor parameter lists tend to grow quite quickly. Some of our controllers expect now 60 or more parameters.

Did we create some anti-pattern here?

EDIT

I should have mentioned that we try to follow thin contoller pattern. Also most of those parameters tend to be mappers – around 66%. The control methods are usually very simple, and follow either this pattern:

  • Based on parameters call appropriate service or repository
  • Use mapper to convert result to appropriate view model
  • Pass view model to view

Or this pattern:

  • Receive model from post action
  • Use mapper to convert it to appropiate domain object
  • Invoke appropriate service or repository with domain object
  • 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-06-17T19:05:31+00:00Added an answer on June 17, 2026 at 7:05 pm

    60 or more parameters is a lot.

    In your question you stated “..Those objects usually include services, repositories, and mappers converting domain object to MVC (view) models…”

    You’ve got a Fat Controller (not the Thomas The Task Engine kind) but a controller that is doing too much.

    The balance I look for is Fat Model skinny controller. Ian Cooper talks about it well in this blog post

    You can also look at things such as which parameters are actually cross cuttings concerns.

    For instance Mapping and Logging in my mind are cross cutting concerns so you could potentially use Action Filters to clean up your controllers.

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

Sidebar

Related Questions

ASP.NET MVC3 newb here. I am working on a MVC3 intranet application that uses
I'm working on a asp.net mvc3 solution that has 3 projects Data, Service, and
I am working on asp.net mvc3 and i want a particular requirement that the
I'm working on ASP.net MVC3 Web application that is facing scalability issue. For improving
I am working on an ASP.NET MVC3 application. In the Views I created a
I am working on ASP.NET 4.0 MVC3 web application that works in intranet environment.
I'm working on an ASP.NET MVC solution that has a number of different menus.
I'm working on a single sign-on solution for two ASP.NET MVC3 websites. The sites
I working on asp.net mvc3 project. I am using autofac for DI. I have
I am currently working on a prototype ASP.NET MVC 3 solution that will be

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.