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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T06:40:35+00:00 2026-06-13T06:40:35+00:00

I am converting a Windows Forms application with all of the logic in the

  • 0

I am converting a Windows Forms application with all of the logic in the UI layer into a 2-Tier application, using WCF for the application/business logic. We are following a pattern where every method on the service takes one parameter, and returns one response object. All of the required data is encapsulated into these objects. For example:

public GetPersonResponse GetPerson(GetPersonRequest req){
    // do stuff
}

public class GetPersonRequest{
    String Name{get;set;}
    Date BirthDate{get;set;}
}

public class GetPersonResponse{
    Person Result {get;set;}
}

My question is in the databinding on the client side. When I go to Data Sources and Show Data Sources, I see the Responses and the entities used in them, but not the requests. In the example above, I would see the GetPersonResponse and the Person, but not GetPersonRequest. It would be very handy to be able to bind the request object to a form, and submit the whole operation with one line of code:

client.GetPerson((GetPersonRequest) getPersonRequestBindingSource.Current);

or at the very least:

GetPersonRequest req = (GetPersonRequest) getPersonRequestBindingSource.Current;
Validate(req);
client.GetPerson(req);

For another example, imagine a CreatePerson method, with the following Request class:

public class CreatePersonRequest{
    String Name {get;set;}
    String Address {get;set;}
    String Address2 {get;set;}
    String City {get;set;}
    String State {get;set;}
    String ZipCode {get;set;}
    Integer Age {get;set;}
    // more stuff here
}

I don’t want code like:

CreatePersonRequest req = new CreatePersonRequest(){
    Name = NameTextBox.Text,
    Address = AddressTextBox.Text,
    Address2 = Address2TextBox.Text,
    City = CityTextBox.Text,
    State = StateComboBox.SelectedValue,
    ZipCode = ZipCodeTextBox.Text,
    Age = Integer.ParseInt(AgeTextBox.Text)
}
client.CreatePerson(req);

I would much rather have:

client.CreatePerson((CreatePersonRequest) createPersonRequestBindingSource.Current)

IMHO, this is much cleaner and maintainable – if a field gets added to the request, I simply update the widgets on the UI, and the code itself doesn’t have to change.

Is there a way to get the requests recognized by the Data Sources within UI Databinding?

.Net 4.0 on both the client and server.

(All code written by hand, so please do not expect it to be able to be run 🙂 )

Edit: To be clear, the request object is showing in the contract; I can make one in the code behind and populate it manually. Just looking for the productivity enhancing data binding functionality to work.

  • 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-13T06:40:36+00:00Added an answer on June 13, 2026 at 6:40 am

    Well, I guess I figured it out. The objects will still appear if you Add New Data Source, and choose Object. They are in the Service’s namespace.

    It would still be nice to have the Service option give me everything I need, but alas – if programming were easy, everyone would be doing it.

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

Sidebar

Related Questions

I am converting a console application into a Windows Forms Application and a DLL.
I am currently converting what was a Console Application into a Windows Form application.
I am currently trying to automate a Windows Forms application by using the Microsoft
I'm converting a windows forms application to a WPF application. Is there a way
Im starting a new project in Visual Studio as Windows Forms Application using C#.
I am converting my C# windows forms application to a C++\CLI windows forms application.
I'm developing a Windows Forms Application in Visual Basic .NET with Visual Studio 2008.
excuse me, i'm trying to make simple application which converting the words into word.
I am currently converting a Windows Form application to ios. The windows implementation uses
I'm in Visual Studio, making a Windows Forms application. I'm having some difficulties with

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.