【问题标题】:Entity Framework 5 ntext equals error实体框架 5 ntext 等于错误
【发布时间】:2016-08-20 19:59:24
【问题描述】:

尝试使用ntext 字段在数据库中查找记录时出现以下错误Entity Framework

enter code hereThe data types ntext and nvarchar are incompatible 
in the equal to operator.

我在这里找到了一些与该问题相关的文章,但我无法修改数据库和更改列类型。

【问题讨论】:

  • 向我们展示您的查询或 EF 生成的查询?
  • @CodeNotFound 初级dbContext.Collection.FirstOrDefault(x=>x.Field = "value")

标签: entity-framework entity-framework-5 ntext


【解决方案1】:

我使用dbcontext.database.sqlquerylike 运算符来解决这个问题,将ntext 行与我的值进行比较。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-07-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-05-17
    • 1970-01-01
    相关资源
    最近更新 更多