WCF call needs to receive a GENERIC param that can receive a list of different “Types”

What is the recommended way to provide a WCF call that has a "Generic" param... something like this.

public interface IDbSync
   void UploadTable(Data<T> table);

...where one client might upload Data<User_Entity>, another client might upload Data<Address_Entity>

...all using the same procedure call

Is this possible with Generics or am I supposed to create one OperationContract x List ??


It is not possible to have a method that takes an open generic type. You can have methods that take a closed generic type.

If you want to have overloading in your WCF methods you should make sure that the operation name is unique (by using the [OperationContract(Name=...)] attribute)

Need Your Help

How to write orientation data to the UIImage iOS SDK

ios camera uiimage orientation uiimagepickercontroller

I have a problem i got a UIImage from imagePicker (camera not library) but when i write it to file with [UIImageJPEGRepresentation writeToFile: atomically:] i'm loosing orientation data(all images ...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.