I am writing a WCF service for the Insert and Delete operation here we used the general method, but it gives the following error "System.Runtime.Serialization.InvalidDataContractException: type" T "cannot be exported as a schema type because it is an open generic type. You you can only export a generic type if all its generic parameter types are actual types. "
here "EntityBase2" is the base class for all objects
[ServiceContract]
[ServiceKnownType(typeof(EntityBase2))]
public interface IBackupUtility
{
[OperationContract]
void Delete<T>(T entity) where T : EntityBase2;
[OperationContract]
void InsertORUpdate<T>(T entity) where T : EntityBase2;
}
The question is, how can I set the generic type 'T'?
source
share