【问题标题】:Does Entity Framework 4 support Many-to-Many queries?Entity Framework 4 是否支持多对多查询?
【发布时间】:2010-08-09 18:28:44
【问题描述】:

我遇到了与这篇文章中描述的完全相同的问题(事件内容/标签对象):

LINQ to entities - Building where clauses to test collections within a many to many relationship

我得到了异常:

无法创建“XXX.Tag”类型的常量值。此上下文仅支持原始类型(“例如 Int32、String 和 Guid”)。

这个问题在 E.F. 4 中解决了吗?

【问题讨论】:

    标签: entity-framework-4


    【解决方案1】:

    这在 EF4.0 中应该可以正常工作

    来自 db.Tags 中的标记 其中 tag.Name.Contains("mytag") 来自 tag.Contents 中的内容 选择内容

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-08-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-02-28
      • 1970-01-01
      • 2012-08-23
      相关资源
      最近更新 更多