I'm using Linq and Hibernate and trying to compare to Strings one from a variable and the other from a Class Linked to Hibernate, the code:
bindingSource.DataSource = (from search in Repository.GetAll()
where search.cod_coluna.CompareTo(CurrentRecord.cod_coluna) > 0
orderby search.cod_coluna select search).Take(1);
And i get an Exception in Runtime, QueryException: Cannot use subqueries on a criteria without a projection.
What i do now?