We have a service reference that points at a WCF service, this acts as a proxy to our model layer where our data access logic is being handled. Under the hood we are using Linq2Sql as the ORM to facilitate the database communication.
We use the generated classes as our data access layer, but what gets returned is actually dumb DTOs objects which are nothing more then POCOs. I would like to do two things)
1) Control what is available on the client through the service reference in terms of custom types and their associated properties. This is to reduce the size of the classes going down.
2) I know that Linq2Sql is actually decorating all of the generated classes with but I do not want these classes coming down through the service reference.
At present, if we use the class as a return type of input parameter it gets serialized. This is fine, except I would like to restrict what properties are available
Thoughts?