We're using Nettiers to generate our DAL and have the need to create a WCF layer for it. So we set up the WCF layer in a codesmith template and immediately ran into a problem, we had thousands of methods in the service contract, and the service took over a minute to initialize. Yuck.
We could have separated out the service contracts into a bunch of different contracts, but that would have been nasty--we would have had over 100 some odd different services to put in the config file.
So the next option was to make a method that allowed us to pass in the provider, method name, and parameters to the method and then call that method on the SQLClient provider using reflection.
I was able to get that wired up and then got the following message in the trace of the server call (note that I removed class names):
There was an error while trying to serialize parameter "blah". The InnerException message was 'Type 'TList`1[[Entity, dll, Version=1.0.149.0, Culture=neutral, PublicKeyToken=null]]' with data contract name 'ArrayOfEntity:http://schemas.datacontract.org/2004/07/' is not expected. Add any types not known statically to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding them to the list of known types passed to DataContractSerializer.'. Please see InnerException for more details.
After some searching, I found an article about adding known types. I'll probably opt for the static version. We'll see how it goes.