ok, that means we have a situation where the query is executed against the database (no pk shortcut taken) and sometimes fails to find an instance that seems to have been there before. Now, I have more questions:
(a) Which database do you use.
(b) Please check that the column type in the model for State is correctly set to nvarchar(max).
(c) I would really like to understand why debugging should have an influence on the result. The only thing that I think could play a role here is the automatic display of property values in the debugger, as the display will need to fetch them from the database, thus altering the internal state compared to non-debugging executions. Can you turn off this feature in the Visual Studio (tools/debugging) and try again?
the Telerik team