I use the interface as an input parameter in OperationContract. But when I create a proxy class on the client side. I cannot access members of an interface or class implementing the ITransaction interface. I'm only geeting this object
Service interface
[ServiceContract] public interface IServiceInterface { [OperationContract] string SyncDatabase(ITransaction TransactionObject); }
Class of service
class SyncService:IServiceInterface { public string SyncDatabase(ITransaction TransactionObject) { return "Hello There!!"; } }
Interface
public interface ITransaction { ExpenseData ExpData { get; set; } void Add(ITransaction transactionObject); }
Data contract
[DataContract] public class Transaction:ITransaction { [DataMember] public ExpenseData ExpData { get; set; } public void Add(ITransaction transactionObject) { } }
In the above case, I should also copy the class and iTransaction interface to the client
source share