Creating WCF DataContracts dynamically from code

Posted by Fredrik Tonn on Stack Overflow See other posts from Stack Overflow or by Fredrik Tonn
Published on 2010-02-11T08:21:09Z Indexed on 2010/04/24 2:33 UTC
Read the original article Hit count: 454

Given the fact that I have a fully dynamic object model, that is, I have no concrete classes defined anywhere in code, but I still want to be able to create WCF DataContracts for them so I can use them in operations. How can I achieve this?

My concrete class "Entity" implements ICustomTypeDescriptor which is used to present the various properties to the outside world, but my expeimentation with WCF suggests that WCF does not care about ICustomTypeDescriptor. Is this correct or have I missed something?

Is this possible? It cannot be so that the only way to create a DataContract is to actually have a concrete harcoded class, can it?

© Stack Overflow or respective owner

Related posts about wcf

Related posts about datacontract