I have a class like below
[DataContract]
public class Order
{
[DataMember]
int orderId
[DataMember]
string ProductCode
[DataMember]
Double Quantity
[DataMember]
Decimal AmountToPay
}
Is it possible to have AmountToPay field as readOnly(as it will be calculated backend) so that clients wont be able to set it?
I know the calculation can override what is set by the client but I think its much neater if the client is not able to set it.