Reuse classes and objects for both WCF and non-WCF

Posted by joebeazelman on Stack Overflow See other posts from Stack Overflow or by joebeazelman
Published on 2010-03-30T19:44:11Z Indexed on 2010/03/30 19:53 UTC
Read the original article Hit count: 930

Filed under:

I have several classes such as Order, Customer, etc. These classes serve for holding data and nothing more. I want to be able to reuse these classes in other projects in the future, but for some reason I don't quite understand, WCF forces me to decorate the data members with the [DataMember] attribute, forcing me to reference WCF plumbing that I will never use in other projects.

I would imagine that WCF lets you take any serializable class and use it as a content type. Am I understanding this correctly?

© Stack Overflow or respective owner

Related posts about wcf