为什么 WCFTestclient 不理解标准 EF 对象但理解 STE 对象
当我尝试使用公开返回标准 EF 对象的操作的 WCF 服务时,我收到有关这些操作的警告。该警告指出“WCF 测试客户端不支持此操作,因为它使用类型
如果我更改标准代码生成过程并生成自跟踪实体 (STE),我会收到也用 DataContract 属性装饰的类,但它们不再从 EntityObject 继承。 WCFTestClient 支持返回 STE 对象的 WCF 操作。
EntityObject 中是什么阻止了 WCFTestClient 调用/显示这些操作?
EntityObject 还用 [Serialized] 和 [DataContract] 进行修饰。
我知道除了 WCFTestClient 之外我还可以使用其他工具,并且我已经编写了自己的测试客户端,但我很好奇为什么它会这样。
When I try to consume a WCF service which expose operations that return standard EF objects I receive a warning on these operations. The warning states "This operation is not supported in the WCF Test Client because it uses type < EntityName >". The generated source code for the entities in my EF model contains ordinary C# classes, inherited from EntityObject and decorated with [EdmEntityType],[Serializable] and [DataContract] attribute.
If I change the standard code generation process and instead produce Self Tracking Entities (STE) I receive classes which are also decorated with the DataContract attribute but they don't inherit from EntityObject anymore. WCF Operations that return STE objects ARE supported by the WCFTestClient.
What is it in EntityObject that prevent WCFTestClient from calling / displaying these operations?
EntityObject is also decorated with [Serializable] and [DataContract].
I know there are other tools besides WCFTestClient that I could use and I have already coded my own testclient but I'm curious of why it behaves like this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论