Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/325.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 不支持WCFTestClient操作,因为它是类型_C#_Wcf_Entity Framework_Serialization_Wcftestclient - Fatal编程技术网

C# 不支持WCFTestClient操作,因为它是类型

C# 不支持WCFTestClient操作,因为它是类型,c#,wcf,entity-framework,serialization,wcftestclient,C#,Wcf,Entity Framework,Serialization,Wcftestclient,为什么我获取WCFTestClient不支持的操作,因为它的类型是。。。?(见截图) simillar方法适用于普通普通契约,但不适用于引用实体框架类的契约 有两个响应数据契约 普通数据合同 [数据合同] 公共类GetSomeResponseDataContract { 私人募捐基金 [DataMember] public Collection<MyFund> MyFund { Get { } } 具有EntityDataContract的数据协定 [数据合同] 公共类

为什么我获取WCFTestClient不支持的操作,因为它的类型是。。。?(见截图)

simillar方法适用于普通普通契约,但不适用于引用实体框架类的契约

有两个响应数据契约

  • 普通数据合同

    [数据合同] 公共类GetSomeResponseDataContract { 私人募捐基金

    [DataMember]
    public Collection<MyFund> MyFund
    {
        Get { }
    }
    
    • 具有EntityDataContract的数据协定

      [数据合同] 公共类GetYoursResponseAcontract { 私募基金

          [DataMember]
          public Collection<YoursFund> YourFund
          {
              Get { }
          }
      }
      

      以下是WCF测试客户端不支持的功能列表:

      类型:流、消息、XmlElement、XmlAttribute、XmlNode、实现IXmlSerializable接口的类型,包括相关的XmlSchemaProviderAttribute属性、XDocument和XElement类型以及ADO.NET数据表类型

      尝试使用其他客户端(如WCFStorm)或创建代理客户端并检查

      在您的情况下,尝试将结果作为列表而不是集合返回

          [DataMember]
          public Collection<YoursFund> YourFund
          {
              Get { }
          }
      }
      
       [EdmEntityTypeAttribute(NamespaceName="RModel1", Name="YoursFund")]
          [Serializable()]
          [DataContractAttribute(IsReference=true)]
          public partial class YoursFund : EntityObject
          {
      [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
             [DataMemberAttribute()]
              public global::System.String FundCode
              {
                  get
                  {
                      return _FundCode;
                  }
                  set
                  {
                      OnFundCodeChanging(value);
                      ReportPropertyChanging("FundCode");
                      _FundCode = StructuralObject.SetValidValue(value, false);
                      ReportPropertyChanged("FundCode");
                      OnFundCodeChanged();
                  }
              }
      }