I found the solution.
Here goes if anyone came across the same problem.
Changed the code to between open() and close() session as below:
Code:
ISession session = _factory.OpenSession();
String sql = "SELECT DISTINCT TNSECAO.* " +
"FROM TNSECLINHA INNER JOIN TNSECAO ON " +
"TNSECLINHA.CODSECAODESTINO = TNSECAO.CODSECAO " +
"WHERE (TNSECLINHA.CODSECAOORIGEM = " + CodOrigem + ") ORDER BY DESCRSECAO";
IQuery query = session.CreateSQLQuery(sql).AddEntity(typeof(Tnsecao));
List<Tnsecao> listaObjetos = ConvertIListToGenericList(query.List());
session.Close();
return listaObjetos;
The documentation about this is not so clear (maybe to me, on the first reading). And i have not found much code hints on the Internet.