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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T12:28:06+00:00 2026-05-15T12:28:06+00:00

I am currently looking to design some WCF services and wanted to get the

  • 0

I am currently looking to design some WCF services and wanted to get the community’s opinion on the best way to handle operation / data contracts.

I have 2 basic operation contracts, the first creates a quote and the second adds an item to a quote (and calculates totals behind the scene).

The first takes in customer information and store information and returns a quote.

The second takes in a quote and an item object, calculates totals and returns a quote with the item.

My question is about how to design the data contracts in this scenario?

For the CreateQuote, should a quote object be passed in with a customer property and a store property set or should there be some kind of QuoteRequest object which contains a customer & store object but with no quote object passed in?

For the AddQuoteItem, should a QuoteItem object be passed in with required properties set including a Quote object or should there be a QuoteItemRequest object that has a Quote object and an item object (with no relation) and then a recalculated Quote with a QuoteItem object is returned?

In other words should they look something like this?

Quote CreateQuote(Quote quote);

Quote AddQuoteItem(QuoteItem quoteItem);

Or should they look something like this?

Quote CreateQuote(QuoteRequest quoteRequest);

Quote AddQuoteItem(QuoteItemRequest quoteItemRequest);
  • 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-15T12:28:06+00:00Added an answer on May 15, 2026 at 12:28 pm

    I would argue that wrapping them in request/response wrappers might prove to be a little superfluous. You can always presume that parameters to WCF service methods are the “request” and the return type is the “response”.

    In your scenario, pass a Customer type and Store type to the CreateQuote method and return a Quote type. Then pass a Quote type and return either your Quote type again, or a bool indicating success instead, to the AddQuoteItem method.

    Again in your scenario, your request/response classes would simply be one-level wrappers around a single type. I could only envisage a scenario where you would return a response-esque class to wrap multiple different types in the method’s single return value.

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

Sidebar

Related Questions

I am looking for some good information on the best way for a design
I'm looking for the best way to design a shopping cart. I'm at a
I am currently looking for a way to remove fullstops from a string in
I'm currently looking at a hefty Rails test suite. It's nothing I can get
Looking for some help on some names for a project I'm currently working on.
I am currently refactoring some old code. I am looking for directions on the
Greetings all! Looking for some help with MVC in a PHP context. Currently I
I am looking for some best practices/patterns to transform objects from one to another.
I'm trying to figure out the best way to implement MVC design in my
I'm trying to find a design pattern or a best practice, or some other

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.