I am having some issues when running sp_executesql on a database table. I am using an ORM (NHibernate) that generates a SQL query that queries one table in this case. This tab
what is the data type of .[Context] use the same datatype
right now you are using nvarchar(2) but that seems odd for something like 55, if you are not using the same data types you will get conversions which then cause scans
based on your updated question, it looks like it is varchar(255), then do this
WHERE this_.[Context] = @p0',N'@p0 varchar(255)',@p0='55'