Why doesn't WCFTestclient understand standard EF objects but understands STE objects

别说谁变了你拦得住时间么 提交于 2019-12-02 00:55:22

问题


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.

来源:https://stackoverflow.com/questions/9278793/why-doesnt-wcftestclient-understand-standard-ef-objects-but-understands-ste-obj

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!