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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:44:30+00:00 2026-05-26T05:44:30+00:00

This is as much a design as a technical question. I’m not sure I

  • 0

This is as much a design as a technical question. I’m not sure I am doing this right…

I have a WCF API which communicates with a DB and passes back a Person object (which is defined in a separate .dll) This has both methods and attributes. The object is being sent from the WCF to the calling client.

I want to call the Person’s methods on the client. I understand that these cannot be sent downstream from the API. However, if I reference the same .dll that the WCF uses should I be able to cast the API Person to a .dll Person then run the methods?

I hope it is clear what I am trying to achieve.

  • 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-26T05:44:31+00:00Added an answer on May 26, 2026 at 5:44 am

    WCF supports the ability to re-use references that are already included in the project. In this sense, you can create a contracts assembly (an assembly that contains your thin domain models (e.g. Person etc) which you can add your own logic to.

    You can then add assembly to both your WCF service, and the calling client projects, and instruct WCF to re-use any existing references. This way, what is pulled back from your service is deserialised into local copy of a Person, but not a Person that would generated as a proxy, you actually get a full instance, on which you can perform method calls.

    Don’t forget through, you are marshalling by value in this case. Any changes you make to the Person instance are local to the client only, you would need to pass it back upstream to your WCF service again (through serialisation) for the service to recognise any changes and act accordingly.

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

Sidebar

Related Questions

I'm not sure exactly how much this falls under 'programming' opposed to 'program language
I have a regular expression like this (much simplified): ^(ab)*$ And am matching against
Important : Please see this very much related question: Return multiple values in C++
This is pretty much the same problem i have, except with very different code:
This is pretty much a duplicate question but instead of using Castle Dynamic Proxy
Not certain if this will get much response due to the newness of Windows
I've simplified this example as much as I can. I have a remote function:
First of all let me say I'm not much of a design guy. Most
This is a design question, I guess there going to be several suggestions (I
This is a high level/design type question rather than anything specific. In this game

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.