Datacontract exception. Cannot be serialized

前端 未结 6 880
天命终不由人
天命终不由人 2021-01-01 08:28

I have the following WCF DataContract:

[DataContract]
public class Occupant
{
    private string _Name;
    private string _Email;
    private string _Organi         


        
6条回答
  •  借酒劲吻你
    2021-01-01 09:10

    When you have NO setter by default, do these steps:

    1. Add parametreless constructor;
    2. And add private set at least.

    This helps me.

提交回复
热议问题