我正在使用 WCF Data Services 5.2 公开 EF5 CF 数据,在我的一个实体上,我有一个 enum
,我阅读了相关内容并设置了 IgnoreProperties('')
我的类(class)的属性。
但我还有一个异常(exception):
"The property '' on the type '' is an 'EnumType'. It is not an handled primitive type" (sorry for the translation the exception is in french on my workstation)
我浏览了这篇文章: Ignore properties attribute not working in WCF Data Services 5.0 RTM Release并删除了所有解决方案中对 System.Data.Services 4.0.0.0 的所有引用。 可以肯定的是,我什至使用资源管理器在所有解决方案文件中进行了文本搜索
调试模块窗口显示我没有加载 System.Data.Services。
奇怪的是,使用融合日志我看到 System.Data.Services.Client, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
已加载到我的应用程序中的某个位置,并且我实在想不通在哪里。
我尝试暂时从 GAC 中删除所有 system.data.services.*
,但仍然失败并出现相同的异常
最佳答案
如果您阅读下面的 MSDN 论坛帖子,它会说 IgnoreProperties 属性仅支持 ReflectionProvider,而不支持 EF 提供程序。
关于wcf-data-services - Wcf 数据服务 5.2 IgnoreProperty 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14327209/