wcf-data-services - Wcf 数据服务 5.2 IgnoreProperty 失败

标签 wcf-data-services

我正在使用 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/

相关文章:

c# - 每个数据库多个/单个 *.edmx 文件

c# - 通过记录对象的新实例更新 TableServiceContext 中的记录?

c# - 在服务器上打开 IncludeExceptionDetailInFaults(来自 ServiceBehaviorAttribute 或 <serviceDebug> 配置行为)

linq - WCF 数据服务与 EF4 的多对多关系

asp.net - WCF 数据服务还是 WCF 服务?

wcf - Microsoft.Data.Services.Client 是否缓存数据?

c# - 在 WCF 数据服务应用程序中迁移 EntityFramwork 6 和 VS 2013 后无法更新或删除

android - wcf 数据服务中的 android 推送通知

web-services - Windows Phone 7 - 加速数据获取的最佳实践

c# - WCF 数据服务/ Entity Framework : Logging client's username, 身份验证、授权