I have a ServiceContract on the server like this:
[ServiceContract]
public interface ICheckService
{
[OperationContract]
IEnumerable<Message> CheckInbox(string user);
}
I copied above definition into the proxy class on the client:
[ServiceContract]
public interface ICheckService
{
[OperationContract]
IEnumerable<Message> CheckInbox(string user);
}
When I am compiling the client, I get the following error:
The type or namespace name 'Message' could not be found (are you missing a using directive or an assembly reference?) (CS0246)
Message.cs
public class Message
{
public int message_id;
public string message_from;
public string message_to;
public string message_text;
public DateTime message_time;
}
Is this where DataContracts come into play? If so, What should I modify in the ServiceContract definition?
Note: The ServiceContract has other OperationContracts which return simple data types and are working.
Something like that 🙂