I'm currently working on a wcf service that does some lookups in a database and return the data to the client. The user has entered an id of something he wants to see in a textbox. This could be a client-id, a product-id, an order-id or whatever. The lookup method on the server tries to find the id in the client table. If it's not in there it goes on the the product table etc, until it's found.
When calling to the server there is no way to tell what the user is looking for. As far as I know I need to specify the return type design time, otherwise serialisation of the objects doesn't work. The only thing I can come up with is helper class containing all possible objects and return that from the wcfservice, any better ideas?
Additional info: We're using a wsHttpBinding and Linq-To-Sql. The database is legacy and also used other software so the dataobjects can't be changed.