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

  • Home
  • SEARCH
  • 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 6934925
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:01:38+00:00 2026-05-27T12:01:38+00:00

I am creating a WPF Smart Client app which uses WCF and NHibernate on

  • 0

I am creating a WPF Smart Client app which uses WCF and NHibernate on the back end. I am making good progress but have a question with regards how to get databack from the WCF Service to enable buttons / functionality in the WPF smart client.

At the moment I have a CreateProduct screen which ultimately calls WCFProductService.CreateProduct(ProductDTO productDetails) to the WCF service. This works fine and creates a product record in the database. The CreateProduct method does not currently return anything.

I do not want to create a massive DTO in memory then send that across the wire. I am aiming to do something more along the lines of Create The Product then AddSomething, AddSomething else as seperate tasks.

To this end I have a button AddAttribute. Add Attribute has to work in the context of a product at the WCF service level so I need to send a ProductId in the AddAttributeDTO. Of course at this stage the ProductDTO does not have an Id in it as it has been created entirely in memory before being sent off to the WCF Service.

I assume that the WCF service call CreateProduct will need to return some sort of object that contains the Id and other data

What form should this take?
Are there any documents on guidance / best practice for this?
How can then I use this to enable the relevant buttons?

Thanks in advance for any assistance

Alex

  • 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-27T12:01:38+00:00Added an answer on May 27, 2026 at 12:01 pm

    You can simple return a DTO back to the consumer, adding whatever information you need to.

    public class AddProductResponse
    {
        public string ProductId { get; set; }
    }
    

    Your OperationContract would then look like

    public AddProductResponse AddProduct(YourProductDto dto)
    {
    }
    

    I would also add the your idea about adding ‘parts’ to an already existing product is probably overkill. Unless you product contains literally 100000’s of attributes, it will not consume anywhere near the sort of memory you should worry about. It will be a lot cleaner and simpler to maintain having a single DTO with corresponding methods for adding, updating, etc.

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

Sidebar

Related Questions

Is there any good tutorial for creating WPF controls entirely at runtime? Thanks
I'm creating a WPF app and have a system tray icon with a context
I'm creating an WPF app, so I'm mostly working with the ImageSource class for
I have begun creating a wpf mvvm app. It seems a vital ingredient to
I am creating a WPF app using MVVM. The app manages tagged documents, called
I am creating a wpf application and in which i have to create a
I'm currently creating a WPF app in C# and have been following this diagram
I'm considering creating a WPF front end for a Silverlight application. Since Silverlight generally
I'm creating a WPF app and I would like to know the best way
I am creating a WPF/MVVM framework which generates the code for the model classes.

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.