I have an ADO.NET Data service that I run through WCF:
public class AdminService : DataService<BOPApplicationAccessEntities> {
public static void InitializeService(DataServiceConfiguration config) {
config.UseVerboseErrors = true;
config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V2;
config.SetEntitySetAccessRule("*", EntitySetRights.All);
}
}
I'd like to add some custom methods to it, such as the following contract
[ServiceContract]
public interface IAdminService {
[OperationContract]
void RequestAccess(int applicationID, string username);
}
If I add the decoration and implement the method on the data service, an error is thrown when a client tries to connect, saying:
AdminService implements multiple servicecontract types, and no endpoints are defined in the configuration file.
Is it not possible to add service contracts onto an ADO.NET data services service?