Reputation: 9926
I have class that is a DataContract and the member values are holding default values. When i create object of this type in the client machine i don't see that the default values are set.
The Class:
[DataContract]
public class ServiceControl
{
[DataMember(EmitDefaultValue = false)]
public decimal Value1 = 1.0m;
[DataMember( EmitDefaultValue = false )]
public decimal Value2 = 1.0m;
}
Upvotes: 1
Views: 1124
Reputation: 81680
Most probably since you are using a "Add Service Reference". This will only copy the definition using WSDL and will not contain any code or business logic in your classes.
You can reuse your0 DTO/Entities:
Upvotes: 2