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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T14:25:06+00:00 2026-05-21T14:25:06+00:00

currently, in my team, we have very live debate about some issues in our

  • 0

currently, in my team, we have very live debate about some issues in our asp.net mvc project.
to cut a long story short, it’s all about should we be using objects as a some kind of container for parameters to call a methods in our project…other side(me :)) is more on the side that methods should be called with primitive parameters…

what do you think and what is for you the best approach, and in which cases?

thank you 🙂

  • 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-21T14:25:07+00:00Added an answer on May 21, 2026 at 2:25 pm

    Yes, models/objects should be passed to methods. It’s how the framework was intended to be used – hence the built-in model binder.

    The approach of passing objects as parameters also allows you to refactor and change the details of your implementation without having to alter the method signature throughout your code if say, you wanted to include a new item of data in your method call, you could simply add a new property to your model object, rather than alter method signatures. It’s a much more flexible and easier to read approach.

    In contrast, I’m sure you will have seen method signatures in ‘legacy’ codebases that get really out of hand in projects of any significant age where developers keep adding parameters as they need them, rather than use an object (not my code, I should add, lest my reputation be ruined!) – This kind of thing can get quickly out of hand when code is being rapidly developed and can lead to code rot.

    Finally, on a more general note about method parameters, if you start to have more than say 4, or 5, then this is usually an indication that your method is doing too much and needs to be refactored with respect to SOC (Separation of Concerns).

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

Sidebar

Related Questions

We (small team) currently have our Visual Studio projects on a network drive (no
I'm currently setting up CI for my project and have team city configure and
Our team is currently working on a large project which makes heavy use of
We currently have a solution that was completely written by hand in ASP.NET and
Currently, I found that it's very inefficient use of Maven in our team. So
Our team is currently using some ported code from an old architecture to a
My team currently has a development web/database server and a live deployment web server
Currently our dev team uses this pattern, but I can't help but wonder if
We are currently setting up Team Build 2010 for our company, and I am
In the project my team is currently working on, we're modifying a commercial PHP

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.