Connecting Tech Pros Worldwide Forums | Help | Site Map

DataContract in separate assembly

Padu
Guest
 
Posts: n/a
#1: Sep 19 '08
Hi All,

In WCF, up to now, I've been using the default pattern of creating an
IService.cs that holds both [ServiceContract] and [DataContract] for the
composite types that must be returned by the service operations.

It turns out that now I want to separate my DataContract classes into a
separate assembly. I already realized that I now must reference
System.Runtime.Serialization. Do you see any problem in doing that (I mean,
placing the classes into another assembly?)

Cheers

Padu


Paul Musso
Guest
 
Posts: n/a
#2: Sep 23 '08

re: DataContract in separate assembly


Padu a présenté l'énoncé suivant :
Quote:
Hi All,
>
In WCF, up to now, I've been using the default pattern of creating an
IService.cs that holds both [ServiceContract] and [DataContract] for the
composite types that must be returned by the service operations.
>
It turns out that now I want to separate my DataContract classes into a
separate assembly. I already realized that I now must reference
System.Runtime.Serialization. Do you see any problem in doing that (I mean,
placing the classes into another assembly?)
>
Cheers
>
Padu
Hi Padu,

I think it's as you want. Personally, I prefer to have in a same place
(same assembly) Data and Service contracts. It's more simple to
understand the architecture.

In general, don't do things that complicate your code. Do only things
that help you.

--
Paul Musso


Closed Thread