Namespace for [DataContract]

前端 未结 6 2174
一个人的身影
一个人的身影 2020-11-30 18:39

I can\'t find the namespace to use for [DataContract] and [DataMember] elements. According to what I\'ve found, it seems that adding the following

6条回答
  •  悲&欢浪女
    2020-11-30 18:55

    First, I add the references to my Model, then I use them in my code. There are two references you should add:

    using System.ServiceModel;
    using System.Runtime.Serialization;

    then, this problem was solved in my program. I hope this answer can help you. Thanks.

提交回复
热议问题