Linq.Sql => Escape curly brackets strings

Is there anyway we could escape curly brackets when using Linq.Sql , without having to use the database's char or chr function?

When I have a condition like Linq.Sql('entity_id = ''{xxx-any-38char-guid-xxx}'' '), it tries to find a column &/or property named as whatever I have between these brackets (generating an error, as this property doesn't exist).

You can use parameters for that:

Linq.Sql<string>('entity_id = ?', '{xxx-any-38char-guid-xxx}')

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.