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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T05:09:37+00:00 2026-05-21T05:09:37+00:00

I have a method called GetObjectsRelatedToAType, e.g. GetCarsRelatedToDealership. Which approach is better from a

  • 0

I have a method called GetObjectsRelatedToAType, e.g. GetCarsRelatedToDealership. Which approach is better from a web services or general method signature standpoint:

List<Cars> GetCarsRelatedToDealership( Dealership dealership );

or

List<Cars> GetCarsRelatedToDealership( id dealership );

I tend to like the object approach because it is a little more forceful about making sure the source input to the method is valid. Thoughts/advice?

  • 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-21T05:09:38+00:00Added an answer on May 21, 2026 at 5:09 am

    For the web services I try to minimize how much data is being sent over the wire. If you also need a method I would probably make member method “GetRelatedCars” for the “Dealership” class/interface. When the web service call comes you could validate it is a real “Dealership” (and the caller has rights to it) by getting that object based on the id and for the call the “GetRelatedCars” method on the object.

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

Sidebar

Related Questions

I have a method called myMethod which maps to the following DWR method: List<MyObject>
I have a method called setSound() which is setting up a queue and adding
I have a controller method called Edit in which the user can edit data
I have a controller which has a method called history class UsersController < ApplicationController
I have a method called getTheUserInput in a class which returns a String which
I have a method called Rotate and I am calling it from another method
I have a method called xyz which returns an object. private XYZ xyz() {
In ObjectDataSource we have a method called SelectMethod and TypeName in which we can
I have a method called getTitle which is in a NSString category, and it
I have a method called -showMoreTools: which is: - (IBAction) showMoreTools:(id)sender { UIActionSheet *popupQuery

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.