Looking for some guidance on a WCF service I’m prototyping.
I have a WCF service hosted in IIS that will pass data to my clients. I have a separate shared assembly that contains all my business objects that is referenced in my WCF project.
I want to have a few of the properties in these business objects read only as I don’t want my customers to be able to change these fields in their client code.
I read that decorating classes with the [DataContract] attribute enforces the proper serialization to maintain readonly fields but when I implement it the proxy classes generated in the client show as writable.
Are there any tricks to accomplish this?
Thanks!
/Eric