public class Request
{
public string ID { get; internal set; }
public int TaskID { get; set; }
public Request()
{
ID = System.Guid.NewGuid().ToString();
}
}
On the client side I only see TaskID property. I don’t get it why the ‘ID’ property is not visible?
If I remove ‘internal’ it works. But I need it to be internal.
My bad, I should have mentioned it that it’s WCF.
Thanks for all the answers. I realized that what I’m trying is not possible.
ok; assuming this is a service, a workaround would be to give the client some sort of hashed token rather than the real ID, then, upon receiving a request back from the client, you could lookup the real ID by token, or throw an exception if they changed it.