locked
WHERE Clause converting to nvarchar RRS feed

  • Question

  • My scenario:

     

    DB Table:

    ID_Doc int PK

    Doc varchar(14)

     

    Entity:

    Doc (String)

     

    Query:

    Dim QryDoc = (From Document In DBContext.TableDoc Where Documento.Doc = '114').First

    Query Translated by LINQ:

    SELECT * FROM TableDoc Where Doc = N'114'

    Problem:

    My TableDoc.Column it's varchar(14) and translating to nvarchar it's timeing out, I believe this translation is consuming everything because my table have 145 milions of rows.

     

    Question:

    Is there anyway to generate this LINQ query without the N' or have some sort of setting to disallow this convertion?

     


    Angelo Bestetti
    Monday, November 8, 2010 2:00 PM

Answers

All replies