You'll want to check out this blog entry:
http://sholliday.spaces.live.com/Blog/cns!A68482B9628A842A!158.entry
...
You have to remember that with WCF, you have the ability to expose DotNet
code to non-DotNet clients.
Thus the "client side proxy".
In a DotNet to DotNet world, you don't necessarily want that. You want
things on both sides about the same....
and WCF is a service.
The blog entry should help.
<Bjorn Sigurd Johansenwrote in message
news:20********************************@spidersolu tions.no...
Dear all,
I have a similar problem in a Visual Studio solution with two projects:
Project 1: "Normal" class library which contains public business objects.
The DLL created by this project may be called directly by the user (as a
DLL assembly).
Project 2: A WCF server containing services where I want to use the
*SAME* business objects as parameters in public "ServiceContract"
functions. (This is important as I do not want to write 2 versions of
each business object).
But this seems somewhat impossible, as
1) It seems impossible to add the "DataContract"/"DateMember" attributes
to objects in BusinessServer.dll, and also
2) It seems impossible to define the business objects in the WCF-server
project and have them accessible/exposable by Project 1.
So, HOW TO REUSE BUSINESS OBJECTS BOTH AS "NORMAL" BUSINESS OBJECTS IN THE
DLL, *AND* AS "DataContract" OBJECTS IN WCF SERVICE?
This type of code reuse seems to me to be very important.
Best regards,
Bjørn Sigurd Johansen
Norway