Search code examples
entity-frameworkentity-framework-5ntext

Entity Framework 5 ntext equals error


i have the following error when trying to find a record in database by ntext field using Entity Framework

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

I found a few articles here related to that issue but i can't modify database and change column type.


Solution

  • I solve that problem using dbcontext.database.sqlquery with like operator to compare ntext rows with my value.