Can a WCF data contract contain a WCF operation contract inside it? Why?
问题 I have a data contract say User. It is serializable and goes across the wire. I want an Operation Contract SaveUser(). I can keep SaveUser(User user) in my service contract as an operation contract. But can I keep it inside my data contract itself as its own behavior? Save() should ideally save itself. So as per OO principles, every data contract should know how to save itself and the details should be abstracted from the outer world. Is this possible in WCF? 回答1: I would say no, and rightly