Query Over

13 views
Skip to first unread message

Stefano Paparesta

unread,
Dec 9, 2010, 8:18:36 AM12/9/10
to uNhAddIns
Hello,
i'm new on unhaddins and I got the inspiration from
"uNHAddins.Examples.SessionManagement". In my repository i write this
code:

var ret = Session.CreateQuery("from Anagrafica A");
return ret.List<Anagrafica>();

and work fine.
But when replace with this code (query over)

var list = Session.QueryOver<Anagrafica>()
.OrderBy(m => m.RagioneSociale).Asc
.List();
return list;

i get this error

"Late bound operations cannot be performed on types or methods for
which ContainsGenericParameters is true."

What did I do wrong?

regards

Stefano Paparesta

Gustavo Ringel

unread,
Dec 9, 2010, 8:45:13 AM12/9/10
to unha...@googlegroups.com
Can you explain why do you think that the problem is associated to uNhAddins?
In first place i will think this is more of a question to the NH group, in advance i do not see any problem in your code.

Gustavo.

Stefano Paparesta

unread,
Dec 9, 2010, 9:16:29 AM12/9/10
to uNhAddIns
Sorry
> > Stefano Paparesta- Nascondi testo citato
>
> - Mostra testo citato -

Stefano Paparesta

unread,
Dec 9, 2010, 1:47:54 PM12/9/10
to uNhAddIns
Gustavo, excuse me but i have write a little console application
with the same class definition and mapping, but without unhaddins and
the query work fine.... you can help me for understand the problem.
It's possible a wrong configuration of unhaddins cause this problem?

Many thanks for help

Stefano Paparesta

unread,
Dec 10, 2010, 1:01:07 AM12/10/10
to uNhAddIns
with the
container.Register(Component.For<ISessionWrapper>().ImplementedBy<uNhAddIns.CastleAdapters.SessionWrapper>());

now work fine.

with
container.Register(Component.For<ISessionWrapper>().ImplementedBy<uNhAddIns.LinFuAdapters.SessionWrapper>());

i have the problem, in the TransactionProtectionWrapper class of
LinFuAdapter

regards
Stefano

On 9 Dic, 19:47, Stefano Paparesta <paparesta.stef...@gmail.com>
wrote:

Gustavo Ringel

unread,
Dec 10, 2010, 3:42:55 AM12/10/10
to unha...@googlegroups.com
I have never used the LinFu Wrappper, can you send a failing test with the problem...i may try to take a look at it.

Thanks.

Gustavo.
Reply all
Reply to author
Forward
0 new messages