The essence is as follows. There are 2 services. The structure is similar. In the first service type is used
[DataContract] public class SurveyItem : BindableBase In the second, there is also a type that inherits from BindableBase .
I checked everything, the whole structure is identical. But in the second service the error takes off:
"System.Runtime.Serialization.InvalidDataContractException: Type" AccessPanel.SurveyInvitor.Infrastructure.Models.GeneralQuotaPropertiesSurvey "cannot be derived from a type that is not marked using the DataContractAttribute attribute or SerializableAttribute attribute. BindableBase "using the DataContractAttribute attribute or SerializableAttribute, or remove them from the derived type."
Why in one case swears, but not in the other? Is it possible to somehow mark the base class with this attribute?